Okay, here's my workaround:
The "mytemplate" template:
HTML Code:
<div>
<vb:if condition="$notifications_total">
there are notifications
<vb:else />
no notifications here
</vb:if>
</div>
The plugin, hooked at "process_templates_complete":
PHP Code:
$templater = vB_Template::create('mytemplate');
$templater->register('notifications_menubits', $notifications_menubits);
$templater->register('notifications_total', $notifications_total);
$ubermenu = $templater->render();
$header = str_replace('{ubermenu}', $ubermenu, $header);
Now, in your "header" template, put the string "{ubermenu}" wherever you want the rendering of "mytemplate" to appear.