All perfect praise be to Allah, The Lord of the Worlds. I testify that none is worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
It is permissible for you to rinse your mouth, without exaggeration, while fasting, and what remains of the effect of water in your mouth after rinsing it is something pardoned. There is no blame on one if he swallows it along with his saliva, as long as he is keen on not making it reach his throat while rinsing his mouth. The blood that comes out of the mouth has no effect on your fast, except if you intentionally swallow it, in which case it does break the fast. As for the blood that comes out of the throat, if it reaches the mouth, then one has to spit it out and not to swallow it, as much as possible. If something of it reaches one’s stomach unwillingly or forgetfully, then his fasting is not invalidated because it only becomes invalid if one does this intentionally. If it does not reach the mouth and enters one’s stomach directly from the throat, then there is no harm at all, and nothing is required due to this.
Allah Knows best.