There's no way to hide the Invite or Users tabs on a group by group basis as they're integrated into the core code. No trigger can control their visibility.
The only solutions available for invites is to set "Invite Access" on a group by group basis to "Group Owner". You can also set "Users Public" to "No", but this only prevents non-users of the group from seeing the Users tab.