All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Sawm (fasting) means abstaining from food, drink, sexual intercourse, and other matters that spoil fasting from the beginning of Fajr (dawn) till sunset.
Ibn Taymiyyah said: “The dominant opinion of scholars concerning injection and what is similar to it is that: There is no harm to use it, since Muslims during the time of the Prophet used medicaments when they became sick. Had the Prophet prohibited them to do so, it would have been reported to us through his companions.” [End of quote]
On the other hand, if some water entered through one's anus or urethra while one cleans himself after answering the call of nature, then one's fasting would be still valid.
Allah knows best.