Of course it's possible. Puppet has enough hooks that you can plug in any kind of data transformation you want.
Puppet does not have a direct solution to this particular problem, however. It would be cleanest to write a custom function to do what this job, but it would be quicker to do it with an inline template (which you can consider a proof of concept for that function) something like this:
$nagios_users_string = inline_template("<%= @unifiedusers.select { |k, v| v['nagiosuser'] }.keys.join(',') %>")
$nagios_users = split($nagios_users_string, ',')
John