Proof (inverse function theorem for analytic functions)
Restrict $D$ such that $f'\neq 0$ on $D$ by continuity. By the inverse function theorem on $\R^2$, there are $U$ and $V$ such that $f|_U: U\to V$ is a diffeomorphism. Moreover $$ \begin{align*} Df\inv(y) = (Df(f\inv(y)))\inv = \pmat{a & -b \\ b & a}\inv = \frac{1}{a^2 + b^2} \pmat{a & b \\ -b & a} \end{align*} $$ where $f'(f\inv(y)) = a + bi$. By the Cauchy-Riemann equations, $f|_U\inv$ is holomorphic.