Gorm Flarum also have a separate permission for viewing Profile Pages
No, there's only a built-in option for searching users. In older Flarum versions it was named in a very confusing manner that suggested it might control profile visibility but it was never the case.
It shouldn't be very difficult for an extension to achieve this. Removing the profile page might be troublesome, but preventing to see the discussions and posts of a user should be simple, it's just a search gambit that could be disabled depending on the permissions, and some visual tweaks to the profile page to say that you are not authorized to see the content instead of showing "0 discussions".