Can it be done?
Sure.
Inside author.php
get the user id who viewed profile refers to, using get_queried_object_id()
than check the roleget_queried_object_id()
check the capability and finally conditionally display content based on that.
I said "check the capability" and not "check the role" because check roles is a meh thing, it's a lot better and recommended check for capabilities. Use user_can
for the scope.