Suppose we have $U, V \subset \mathbb{R}^{n}$, and a map $f: U \mapsto V$. If $f$ is a diffeomorphism, must the dimensions of $U$ and $V$ be equal?
I'm thinking this is true since the tangent map $Df_{x}: T_{x}U \mapsto T_{f(x)}V$ has to be a linear isomorphism if $f$ is a diffeomorphism.
You are right, the explanation you gave is also the right one.
If $f$ is a diffeomorphism, then there exists $g\colon V\rightarrow U$ such that $g\circ f=\operatorname{id}_{U}$ and using the chain rule: $$Dg_{f(x)}\circ Df_x=\operatorname{id}_{T_xU},$$ so that $Df_x$ is an invertible linear map.