Can the professor refuse to teach some students, or must he teach all comers?
glhf under the circumstances
One can teach whoever they want to or don't want to. If one joins a university, that changes things. They are now part of an organization larger than themself.