Are you talking about the default classic editor or gutenberg block editor? Or are you talking about a specific plugin page builder like beaver builder?
If you are talking classic or gutenberg, no. And there is typically a reason for that, you are mixing content and logic. Can this be added with a filter instead? I mean, that is what filters are for.
If you are talking about a specific page builder plugin, then let us know which one.
As for other solutions, you can download plugins that allow you to then specifically add PHP code into a page or post (even though it is traditionally not advised). One such plugin is mentioned in this tutorial…