My guess is that you are thinking of the approximation 22/7 ≈ π The two numbers π and 22/7 are not equal, so there's no contradiction in one being rational and the other irrational.
Sometimes you use 22/7 as a number "fairly close" to π, but:
π=3.14159265...