This is a doctor thing not a male doctor thinking a young woman is attractive thing. Doctors can object to providing birth control should a patient not have their pap smear up-to-date or having never had one. Medically it is actually a very good idea to refuse providing the prescription if there is not a relatively recent pap smear as it is used as a preventative procedure which could find far more complicated issues with the patient.Other women may even be refused the pill unless they submit to a pap smear.
As for male doctors and attractive female patients I am sure it happens as there are always some bad apples however a patient should not believe this is the norm in practice. Should anything like that be leaked to staff or higher ups that individual could have their license revoked immediately and hence doctors are not in the game to just grope any attractive woman that comes around. Doctors are there to provide medical expertise and yes if a patient has not had a pap smear or recently done so even if they just come in for a check up the doctor can provide said medical procedure right there. Same applies to physical exams if there is medical reason to do so. If a patient is upset about a doctor providing more medical exams or procedures than what they expected to occur then ask questions. And if something is a very uncomfortable situation that a patient does believe there is something not right happening then it can be reported.