All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is not permissible for a woman to uncover her Awrah (the body parts that must be covered) in front of non-Mahram men. If a woman is in dire necessity and does not have a female doctor while the disease is so severe that endangers the patient's life or may cause damage of an organ and it is not possible to reach a female doctor, then in the above situation a woman may uncover her required part of body to a male doctor.
Know that it should be in the presence of her husband, if it is possible; otherwise, any other Mahram (unmarriageable person). In short, you should not visit a male dentist; you should visit a female dentist. If she is so far that going to her becomes a hardship for you or to the one who takes you, then you may visit a male dentist, taking into consideration all the above conditions.
For more benefit on a woman revealing her ‘Awrah in front of a male doctor, please refer to Fataawa 91787, 322978 and 363661.
Allah knows best.