I was wearing an underwear which was wet by water then emission of madhiyy took place on it and then when I went to washroom, I saw that. I cleaned my private parts, sprinkled water on my underwear, made wudhu and offered salah. Since my clothes didn't get any marks on it, I didn't change my clothes and offer salah with it, is that okay?

I read in many fatwas that it's impure, that's why am getting this doubt and since it was already wet with water and the emission of madhiyy took place, doubt is arising in my mind because I didn't change the dress which I was wearing.

If it is madhy then it is Tahir no problem.
See ruling 70