The continuity condition is not necessary. It's enough that $f$ be injective on some neighborhood. This said, if your function has a sequence of jump discontinuities near $x_0$, you might have that there is no open interval $U$ around $x_0$ for which $f(U)$ is also an interval. This means that $f^{-1}$ might be defined on a strange domain, though we can still *technically* differentiate it to get the desired result.

Formally, the statement you would need to prove is the following:

Let $A$ and $B$ be subsets of $\mathbb R$ and $f:A\rightarrow B$ and $g:B\rightarrow \mathbb R$. Suppose that $x_0\in A$ is an accumulation point of $A$ and $f(x_0)$ is an accumulation point of $B$. Then,

If two of the derivatives $f'(x_0)$ and $g'(f(x_0))$ and $(f\circ g)'(x_0)$ exist and are non-zero, the third exists as well.

If all of the derivatives exist, then $(f\circ g)'(x_0)=f'(x_0)\cdot g'(f(x_0)).$

One you have this statement, you can apply it to a pair where we take $g=f^{-1}$. Note that we can make this work even if $f$ isn't defined on an interval around $x_0$ - it's okay as long as we have enough points to define the relevant limit towards $x_0$.

Granted, it is a bit unusual to talk about derivatives on sets that aren't open, but there's no technical limitations preventing it, though the proof of the suggested lemma is a pain.