To assign a module to a specific group you'd need to use the access parameter of the module, but that's based off the viewing user and not the displayed user. There is no functionality in Joomla for what you're wanting and the best I can suggest is use a CB Content Module then an IF substitution surrounding a module include usage. Example as follows.
View Access Level usage (example is testing for Public view access level):
[cb:if user="#displayed" viewaccesslevel includes "1"]{loadmodule 1}[/cb:if]
Usergroup usage (example is testing for Registered usergroup):
[cb:if user="#displayed" usergroup includes "2"]{loadmodule 1}[/cb:if]
Note for the above to work CB Content Bot needs to be have content processing parameter enabled. See the below regarding substitutions and how to load modules using content.prepare usage.
www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb
docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
The above should display the module with an id of 1 when the displayed profile meets the specified condition.