Include file with functions in node.tpl.php and execute them on node content
Implementation Issues


Included a file in node.tpl.php
I have a function which, afterwards I want to call from a node's content-body


Sorry but I think these are not following best practices. As you can see If these was possible then it would have worked because it's just including a PHP file and calling a function in it but I think Drupal doesn't do it that way and runs the PHP in the body field way before node.tpl.php w/c results to no included PHP file at that time yet.

Suggested solution

Might I suggest, it's better for us to:


Create a custom module
Add your helper functions there with any structure of the files you can but following Drupal standards.
Use Drupal hooks if needed because if you place your functions in the .module file, it will be available already for use.


One example of this way is after adding your helper functions into the .module file and want to execute/run functions when viewing the node, you can use hook_node_view. Maybe add some scripts, remove data, alter data and etc. and you can also do conditional statements there if you want to run specific things for a specific content type.

This just doesn't align your site with best practices but makes it easier to maintain in the long run with less technical debt.

Hope this helps you to be able to call/execute your needed functions on nodes.

UPDATE

You can remove the PHP file inside your theme and transfer the functions/codes inside it in the .module file. After that, you need to Clear All Caches then that will make your functions available or callable.

You don't need to use the include_once or hook function.