Return of yellowish discharge and very slight traces of blood after the end of menstrual bleeding
Question

I have read that the end of menstrual bleeding may be signalled by one of two signs, either complete dryness or the white discharge. But I find it very difficult to work out when my menses has ended, because I have the regular type of bleeding for 4 to 5 days, then after that it reduces little by little, and for three or four days I start to see dryness that lasts for several hours, sometimes for twelve hours or more. And sometimes there is a clear discharge that is somewhat yellowish. Then after that, a few hours later, there is some clear discharge in which there is some blood. It so happens that I do ghusl when I am dry for several hours, and I pray, then I stop praying when I start to bleed again, even though the amount is very, very small, and I wait until it is completely dry, with no sign of yellowish secretions or blood. Sometimes I see the white discharge, and I know that this is the sign that my menses has ended, so I pray. For how long should I see dryness in order to know that my menses has ended? Does that dryness have to last for a day and a night? Please note that for several hours there may be complete dryness with no yellowish discharge or blood.
Praise be to Allah.Menses (hayd) is the regular bleeding that women experience.
Ibn Rushd (may Allah have mercy on him) said:
Allah, may He be exalted, says (interpretation of the meaning): {And they ask you about menstruation. Say, It is harm [adha]} [al-Baqarah 2:222]. What is meant by harm (adha) here is the blood that comes from the uterus. It must be assumed to be menses, until one is certain that it is not menses. This is a matter concerning which I do not know of any difference of scholarly opinion. And Allah is the source of strength.
End quote from al-Bayaan wa’t-Tahseel (1/105).
The harm [adha] referred to, which women experience during the menstrual period, includes not only blood but also yellowish and brownish discharge.
Imam Maalik narrated in al-Muwatta’ (1/59) from ‘Alqamah ibn Abi ‘Alqamah, from his mother, the freed slave woman of ‘Aa’ishah the Mother of the Believers, that she said: The women used to send to ‘Aa’ishah the Mother of the Believers vessels in which were pieces of cotton on which there were yellowish traces of menstrual blood, asking her about prayer.
And that she would say to them: Do not hasten [to resume praying] until you see the white discharge.
What she meant by that was the sign that the menses had ended. This was also narrated by al-Bukhaari in a mu‘allaq majzoom report. Fath al-Baari (1/420). Classed as saheeh by al-Albaani in Irwa’ al-Ghaleel (1/218).
Ibn ‘Abd al-Barr (may Allah have mercy on him) said:
With regard to the words of ‘Aa’ishah, “Do not hasten [to resume praying] until you see the white discharge”, what is meant is: Do not hasten to do ghusl when you see the yellowish discharge, because it is the remains of the menses, until you see the white discharge, which is emitted by the uterus when the bleeding ceases, and is white like plaster. End quote from al-Istidhkaar (3/194).
Based on that, the description of the cessation of bleeding mentioned in the question refers to two situations:
1..  When the cessation, in fact, is incomplete, meaning that some of the yellowish or brownish discharge still remains. This is not regarded as the end of menses, and in this case the woman must be patient and wait until this brownish or yellowish discharge stops, as noted above in the hadith of ‘Aa’ishah (may Allah be pleased with her).
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said:
This indicates that the yellowish and brownish discharge, during the days of the menses, are also menses.
End quote from Fath al-Baari (1/420).
2.. That the cessation of bleeding is complete cessation, meaning that there is no yellowish or brownish discharge left. In this case, this is the sign that the menstrual period has ended.
Shaykh ‘Abd al-Qaadir ibn ‘Umar ash-Shaybaani (may Allah have mercy on him) said:
If the woman’s period ends completely, meaning that if she inserts a piece of cotton its colour will not change, and this cessation lasts even for the shortest time, then she is pure [that is, her menses has ended], so she should do ghusl and pray, and may do everything that women who are not menstruating may do.
That is because Allah, may He be exalted, has described menses as a “harm,” so when the harm goes away, the menses is over. End quote from Nayl al-Awtaar (1/108).
If it is established that the menses has ended, based on its sign, then after that some brownish or yellowish discharge comes out, after a long or short time, this is not regarded as menses.
That is because of the report narrated by al-Bukhaari (326) in as-Saheeh, in the Chapter on yellowish and brownish discharge at times other than menses, from Umm ‘Atiyyah, who said: We used not to regard brownish or yellowish discharge as being of any significance.
It was also narrated by Abu Dawood (307) as: We used not to regard brownish or yellowish discharge following the end of menses as being of any significance. This was classed as saheeh by al-Albaani in Irwa’ al-Ghaleel (1/219).
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Regarding the yellowish and brownish discharge, the fuqaha’ had three views. According to the madhhab of Ahmad and others: Is it menses regardless of when it occurs or not?
The third view – which is the correct one – is that if it occurs during the women’s regular period, along with the black (dark) and red blood, then it is menses, otherwise it is not… Umm ‘Atiyyah said: We used not to regard brownish or yellowish discharge following the end of menses as being of any significance.
End quote from Majmoo‘ al-Fataawa (26/220).
The same applies to a very small amount of blood, such as one or two spots or drops of blood; that does not come under the ruling on menses either.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked:
If a woman gets her menses for eight days, then she does ghusl on the eighth day, then she gets a few light drops of blood on the same day, does she have to do ghusl again? Please note that she may do ghusl twice, and sometimes she does not do ghusl [a second time]; is she sinning? What should she do?
He (may Allah have mercy on him) replied: If she is certain that the bleeding has not stopped completely, then she should wait until it stops completely, then do ghusl.
But if she is certain that it has stopped completely, then she should do ghusl at the time when it stops completely, then if it so happens after that that she sees one or two drops of blood, that does not matter.
End quote from Fataawa Noor ‘ala ad-Darb (3/323).
And Allah knows best.