Oh, it is.
Modern Hippocratic Oath wrote:
I will treat without exception all who seek my ministrations
Being a doctor is not just a job. It is a sacred trust.
When I worked in a medical office we were specifically instructed to treat all patients equally, even the smelly, oozy ones. If a patient is able to suss out that they're not wanted it should be by dint of their own effort, not by the words or actions of their physician or those employed by their physician.
Now, this particular doctor certainly has a legal right to refuse treatment to anyone based on anything or on nothing at all. But ethical? Nope.