Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
No, going to the dentist does not break the fast unless you intentionally swallow water or debris. If swallowed accidentally, the fast remains valid.
Responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
Dental work does not break one’s fast. It does not fall under the category of indulging in food, drink, or sexual activity, which we must avoid.
Some scholars, however, consider it undesirable because of the fear that one may swallow water or debris by mistake. In such a case, it is best to delay the appointment until after Ramadan.
If there is no reasonable fear of swallowing water or debris, and if the work needs to be done, you may go ahead and do it. If you were to swallow something accidentally, after trying your best to avoid it, it would not break the fast. We read in the Quran: “Allah wills that you shall have ease, and does not will you to suffer hardship.” (Al-Baqarah 2:185)
Almighty Allah knows best.