My wife will be having a medical procedure for the removal of a polyp from Uterus.
We will try our best that the doctor is a female but in a public health system we usually do not have the control over it. Is it permissible to go ahead with the procedure if the doctor turns out to be a male?

Yes. It is permissible, if the procedure is a must.