Purity: Ruling on Post-Prayer Doubt About Purification of Anus or Urinary Outlet
Practical Laws of Islam as per the teaching of Ayatullah Sistani
Ruling 68
If after performing prayers (ṣalāh) one doubts whether or not he had purified the anus or urinary outlet before performing prayers, the prayers that he performed are valid but he must purify the anus or urinary outlet for the next prayer.
-Ayatullah Sistani, Practical Laws of Islam, Purification (Taharah)