The hyperbolic plane has this property, as does the Euclidean plane.
If $E$$K$ is any subset of $ \mathbb{H}^2$, and $u : K \to\mathbb{H}^2$ is an isometry, then there is an extension of $u$ which is an isometry of $\mathbb{H}^2$ onto itself. I use "isometry" in the sense: $d(u(x),u(y)) = d(x,y)$ for all $x,y \in E$, where $d$ is the hyperbolic distance in $\mathbb{H}^2$.
So the OP reduces to: is an isometry of $\mathbb{H}^2$ onto itself necessarily a Möbius transformation (or the conjugate of a Möbius transformation)?