Let $f : X \to I$ be a strictly monotone surjective function mapping $X \subseteq \mathbb{R}$ to an interval $I \subseteq \mathbb{R}$. Then is $f$ necessarily continuous?
Without loss of generality assume that $f$ is strictly increasing.
Let $x \in X$ and $\epsilon > 0$. Suppose there exists some $f(a) \in (f(x) - \epsilon, f(x))$ and $f(b) \in (f(x), f(x) + \epsilon)$. Then taking $\delta = \min(x-a,b-x)$ we obtain $$z \in (x - \delta, x + \delta) \implies z \in (a,b) \implies f(z) \in (f(a), f(b)) \subseteq (f(x) - \epsilon, f(x) + \epsilon)$$ so that $f$ is continuous.
Suppose there does not exist $f(a) \in (f(x) - \epsilon, f(x))$. Since $I$ is an interval there is no $f(x') < f(x)$. So there is no $x' < x$ where $x' \in X$. So we can set $a = x - 1$ in the above proof. Similarly if there does not exist $f(b) \in (f(x), f(x) + \epsilon)$, we can set $b = x + 1$ in the above proof.
Is this proof correct? Or can $f$ possibly be discontinuous?
The function $f$ is continuous, but you can give a much simpler argument:
if $f$ is discontinuous at some point $x$, then $f(x^-)<f(x^+)$ (since it is strictly increasing, the two limits exist). Moreover, $f(x)\in[f(x^-),f(x^+)]$ but $f$ takes no other values in the open interval $(f(x^-),f(x^+))$ (either $f(x)$ is there or not, but no other point). So $f$ is not onto.