SHAFAQNA – The Grand Ayatollah Safi answered a question about filling teeth while fasting.
Question: What is the ruling on filling teeth during the Month of Ramadhan (while fasting)?
The Grand Ayatollah Safi: There is no problem for filling, scaling and pulling out teeth for dentists during the Month of Ramadhan. And for the fasting person it is only allowed if the person is sure that the blood or the water which enter inside the mouth by devices/tools will not go down (the throat).
Source: PERSIAN SHAFAQNA