Can a professor ask you to get a medical clearance from your doctor
Yes, the institution has a responsibility to all students and faculty in terms of infectious things and it is probably in the detail of the enrolment form you signed somewhere...

I have seen situations where students were told to not come to class and stay in their rooms until the Doctor cleared them - this was when europe had a "flu / respiratory " bug a while back...

Students are also sometimes required to provide proof of sickness, or death of a relative, when asking for repeat exams or assessments. Had one case where the student photocopied a medical certificate and changed the dates - got caught because the signature was identical on 5 certificates - size, position on the paper etc etc