You are right that all three roots must be real; but then you jump to claim that this implies all three roots (counting multiplicity) are rational. Is that really the case?
Since it has a double root, $f(x)$ (up to scaling by a rational factor) can be written as $f(x) = (x-a)^2(x-b)$. If $a=b$ then $f(x)$ satisfies the hypothesis, and you are correct this would $a$ is rational. But why? Because the coefficient of $x^2$ would be $3a$, and if $3a$ is rational, then $a$ is rational.
If $a\neq b$, then the coefficient of $x^2$ is $2a+b$, the coefficient of $x$ is $a^2+2ab$, and the constant coefficient is $a^2b$. If $a$ is rational, then so is $b$ since $2a+b$ is rational; and if $b$ is rational then so is $2a$, hence so is $a$.
Can we have $a$ and $b$ both irrational, and yet have $2a+b$, $a^2+2ab$, and $a^2b$ all rationals? You need to show this is impossible to conclude that all three roots are rational.