If the blood reaches the stomach without any deliberate action on the part of the fasting person, it does not break his fast, because Allaah says (interpretation of the meaning):
“Allaah burdens not a person beyond his scope. He gets reward for that (good) which he has earned, and he is punished for that (evil) which he has earned. ‘Our Lord! Punish us not if we forget or fall into error’”
And it says in the hadeeth that Allaah said, “I have done that”, i.e., I have forgiven you.
But if it is possible to prevent it, or to spit it out, and you do not do so and you swallow it deliberately, then this breaks the fast. The evidence for that is the words of the Prophet (peace and blessings of Allaah be upon him) to Laqeet ibn Sabrah: “Go to extremes when rinsing your nose, unless you are fasting.” (Narrated by Abu Dawood, 2366; al-Tirmidhi, 788; al-Nasaa’i, 87; Ibn Maajah, 407. Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi, 631)
Shaykh Ibn ‘Uthaymeen said: This indicates that the fasting person should not go to the extreme in rinsing his nose, and we do not know of any reason for this apart from the fact that doing so may be a cause of making water reach the stomach, which would invalidate the fast. Based on this we say: everything that reaches the stomach via the nose breaks the fast.
Al-Sharh al-Mumti’, 6/379.