Assalam’aleykum,I pray this finds you in the best of states.
Jazakum Allah khayr for your question!
A ritual bath is required in the situation you have described because you are not sure whether you have seen ejaculate (mani) or pre-ejaculate (madhi) upon waking up. [ Ibn Abidin, Radd al-Muhtar ]
And Allah knows best.
I hope that the above answers your question. If something is unclear please do not hesitate to ask again.
May Allah Most High grant you the best of this world and the next. Please keep us in your du’as!
[Ustadh] Sufyan Qufi