I think 'fraction' is not really a well-defined mathematical term, but rather, is used to refer to a visual object which represents a number.
I would simply call anything which has a top and bottom a 'fraction', ie. anything in the form $\frac{???}{???}$.
This might include algebraic terms in it, in which case you wouldn't necessarily know if the object is rational or not. But I think most would agree that the object is a 'fraction'.
Whether something is a 'fraction' isn't a well defined property you can place on any number.
For example, you wouldn't call the object '$2\times 0.3$' a fraction, but you would for '$\frac{3}{5}$', although the two expressions are equal.
In the end, I think if the teacher said something along the lines of: a fraction is an object in the form $???\over???$ where the top is called 'the numerator', and the bottom, 'the denominator', then I believe the example shown demonstrates why not all fractions are rationals well enough.