http://revach.net/article.php?id=4252

Section: Halacha   Category: Tshuvos
Piskei Tshuvos: Rinsing Your Mouth & Brushing Teeth On A Taanis
With regard to rinsing your mouth on a Taanis Tzibur. the Michaber (567:3) says you should not do so.  The Mishna Brura says that if this causes you Tzaar, you may rinse your mouth but you should be sure to keep your head bent over so you don't swallow.  On Tisha B'Av, the Mishna Brura says you may only do so if your are in great Tzaar.  On Yom Kippur you must totally refrain from this.

Similarly, says the Piskei Tshuvos based on the Minchas Yitzchok (4:109), L'Chatchila you should not brush your teeth on a Taanis Tzibur, even without water, unless you are in Tzaar.  If you are in Tzaar, you may do so even with water.  And again he cautions if you do so, make sure to bend your head down when rinsing so that you don't swallow any water.

Important Note: We bring this tshuvah as a starting point for discussion and not to relay any halacha.  We try to convey the Tshuva to the best of our ability. We admit that our understanding may not be accurate. One should learn the tshuva to verify the accuracy of our interpretation.  Please understand that this Tshuva may not be the final word on this topic. One should consult a Rav before drawing any conclusions.