My test showed that WordPress includes to the roles drop-down list here all roles from all subsites. I just added new role “Main site only” at the main site. Then went to ‘edit’ page of site selected via the “Network admin -> Sites”, and saw that role in drop-down list for subsite. It’s not correct, this is a WordPress bug possibly.
If you try to assign to a user a role from site 1 which does not exist at site B, then you will receive such error message: “Sorry, you are not allowed to give users that role.”. You can not assign to a user not existing (at this subsite) role.