I was thinking about this. My intuition is that there is a counterexample. Suppose $f:[0,1]\longrightarrow \mathbb{R}$ is continuous. Also suppose
- If $q\in\mathbb{Q}$, then $f(q)\in\mathbb{Q}$.
- $f(0)<0$
- $f(1)>1$
By the Intermediate Value Theorem, for any rational number $r$ with $0