No, you do not:
notify { 'a-message-from-our-sponsors':
message => my_function($the_data)
}
The potential issue is not about the means of computing the message, it is about where the computation is performed, and a bit about when. In particular, if the point of using a function is for it to use data or software available only on the target node, or to modify the target node directly, then the fact that Puppet custom functions are evaluated on the master will render your plan inoperable.
Similarly, if you need the computation to be performed only after one or more resources have been applied to the target node, then a Puppet custom function cannot help you.
John