Even if you could hide it, which I don't think you can, then anyone could still find it by using the browser inspector, or they could work it out if they know how profile URLs work in XenForo (and user IDs can easily be found by other means anyway e.g via mentions).
Why do you want to hide them from some user groups anyway?