Is it possible to call a custom module function in the theme template file?
You can do it, but it's not recommended, because in the Model-View-Controller pattern, your logic is in the Controller (in this case your module) and in the View (your .tpl file) you should only have code to show the values that comes from the Controller.
The idea is that all variables are prepared in template preprocess functions (in modules or in your template.php).
You can implement the hook_preprocess_page():
function YOUR_MODULE_preprocess_page(&amp;$variables) {
    $variables['my_var'] = hello_world();
}

and in your page.tpl.php file you can now use $my_var to output the value set in your preprocess function:
echo $my_var;