You statement is wrong.
It's just a linguistic problem. In mathematics rational numbers and fractions are the same.
Although in real life, you may use the word 'fraction' on any number or piece of something that is not a whole. Which includes irrational numbers, but in this case you really don't care about numbers.
The word 'fraction' is an adjective.
In maths, fraction is a noun.
If you see fraction in any math literature, it means rational number. Otherwise they say irrational number.