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, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
Rinsing the mouth is fulfilled by placing water in the mouth and expelling it, even while wearing the aforementioned dental appliance. This is especially so since it is required for medical treatment; therefore, you should not be concerned about this matter.
Regarding its effect on the pronunciation of certain letters: if the impact is slight—as is normally the case—then it causes no problem. However, if the effect is significant to the extent that it prevents proper articulation of a letter, the matter requires further consideration. In such a case, if the appliance can be removed for the prayer without causing harm, it must be removed. If, however, removing it would result in harm due to medical advice prohibiting its removal, then it may remain in place, and the prayer remains valid despite its presence.
Allah knows best.