Must the dimensions of $V$ and $U$ be equal for $f: U \mapsto V$ to be a diffeomorphism? 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.
Let $n=2$, $U$ be the $x$-axis, $V$ be $\mathbb{R}^2$, and $f:\mathbb{R}^2 \rightarrow \mathbb{R}^2$ be the identity.  Notice $\left. f \right|_U$ is a diffeomorphism $U \rightarrow V$.