This excerpt is taken from the book of Fadhilat al-Shaykh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam and Masail of Ramadan.
Ruling on Using Toothpaste During the Day While Fasting:
Question:
Is it permissible for a fasting person to use toothpaste during the day in Ramadan?
Fatwa:
There is no harm in this provided that care is taken not to swallow it. Just as it is permissible for a fasting person to use a miswak in the early and late parts of the day, it is also permissible to use toothpaste or other similar products. Some scholars have deemed it disliked to use a miswak after noon, but this is a weak opinion, and the correct view is that using a miswak at any time is not disliked because the generality of the Prophet's (peace be upon him) statement necessitates this:
السواك مطهرة للفم ومرضاة للرب
"Using a miswak is a means of cleanliness and purity of the mouth and a reason for the Lord's pleasure."
Reference: (Sunan an-Nasa'i, Book of Purification, Chapter on Encouragement for Miswak, Hadith: 5)
Similarly, the Messenger of Allah (peace be upon him) also said:
لولا أن أشق على أمتي لأمرتهم بالسواك مع كل صلاة
"If there were no fear of hardship for my Ummah, I would have commanded them to use a miswak with every prayer."
Reference: (Sahih Bukhari, Friday, Chapter on Miswak on Friday, Hadith: 887, Sahih Muslim, Book of Purification, Chapter on Miswak, Hadith: 252)
Every prayer includes Dhuhr and Asr, and these are after noon. (Thus, it is clear that using a miswak after noon is also not disliked.)