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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
What you did was the right thing because the basic principle is that nothing came out. It was reported that the Prophet, sallallaahu ‘alayhi wa sallam, was asked about a man who imagined to have passed wind during the prayer. He, sallallaahu ‘alayhi wa sallam, said, “He should not leave (his prayer) until he hears a sound or detects an odor.” [Al-Bukhari and Muslim] This means that the praying person must not leave the prayer abruptly before finishing it as such (based on mere doubts about breaking his ablution) unless he is definitively certain that something came out. Hence, you did the right thing by ignoring this doubt, and your ablution and prayer were valid in the situation described in the question.
Allah knows best.