Praise be to Allah.
This uncertainty that you mention regarding the yellowish discharge and ordinary vaginal secretions does not matter, because the issue can only be one of two things:
Either the yellowish discharge appears before menses or afterwards, and is connected to the monthly period [i.e., before you become pure (tuhr)], or it appears during the monthly period itself, and before you become pure from it with the emission of the thin, clear, white liquid (tuhr).
All of that comes under the heading of menses, whether it is pure yellow or white with a tint of yellow, and there is no basis for your fear of confusing the yellowish discharge with vaginal secretion, because in this case there is no ruling connected to the vaginal secretion, so long as the period is still ongoing, and there is no possibility of the tuhr appearing at all.
But if your period has ended and you have become pure, by seeing the white discharge, or because it has dried up, and you are certain that your period has ended, then anything that is emitted after you are certain that your period has ended can only be one of two things:
Either it is clear, and appears so to the naked eye, without going to the trouble of looking at it with lights or magnifying glasses and the like, and it has no unpleasant smell. This comes under the heading of pure (taahir) vaginal secretions, as it says in al-Insaaf (1/341): There are two reports regarding women’s vaginal secretions… According to one of them, it is pure (taahir), and this is the correct view according to our madhhab, but it invalidates wudoo’.
Or it appears yellowish to the naked eye, without shining lights on it. This is an impure (najis) secretion, as has been explained previously in the answer to question no. 7776 . So the woman should take precautions concerning it, wash it from her garment, and do wudoo’ if it appears. But we cannot deem it to be menses, because it is assumed that the period has ended, as is the view of the Hanbalis.
Ibn Qudaamah (may Allah have mercy on him) said:
If the woman sees the yellowish discharge after the end of her menses, she should not pay any attention to it. This was stated by Ahmad. If she becomes pure (i.e., her menses ended) then she sees some brownish or yellowish discharge, she should not pay any attention to it.
End quote from al-Mughni (1/241).
Ibn Taymiyah (may Allah have mercy on him) said:
No attention should be paid to yellowish or brownish discharge that appears after the menses has ended. Ahmad and others said: That is because in the words of Umm ‘Atiyyah: We used to regard the yellowish and brownish discharge after the end of menses as being of no significance. [Narrated by Abu Dawood (no. 307)].
End quote from al-Fataawa al-Kubra (5/315).
This means that distinguishing between them depends on the colour that is visible to the naked eye, without close inspection. Ordinary moisture or secretions are white and have no unpleasant smell. As for the yellowish discharge that is najis, its yellowish colour is very clear.
The smell of vaginal secretions may be unpleasant because of some infections or bacteria. Hence we do not rely on an unpleasant odour to distinguish the yellowish discharge.
If that is the case, we also advise you to consult a specialist female doctor, because yellowish discharge after the end of menses may be a sign of infection or internal health problems, which must be treated and followed up.
Thus it becomes clear that ordinary vaginal secretions do not resemble the yellowish discharge.
And Allah knows best.