The rank ($T\mapsto \dim Im T$) is a lower semicontinuous function on linear operators, and $f'$ is continuous, so $x\mapsto Rank(f,x)$ is lower semicontinuous as well. Thus $\{x\in U\mid Rank(f,x)>k\}$ is an open set for any $k\in\mathbb{R}$. Let $n:=\max\limits_{x\in U} Rank(f,x)$. For any $a\in U$ $f'(a)=(f\circ f)'(a)=f'(f(a))\circ f'(a),$ thus $Rank(f,a)\le Rank(f,f(a))$. If $a\in f[U]$ the above equality reduces to $f'(a)^2=f'(a)$. Since for projections the rank and trace are equal, and the trace is continuous, $x\mapsto Rank(f,x)$ is continuous on $f[U]$, which is connected, thus $f[U]\subset\{x\in U\mid Rank(f,x)=n\}=\{x\in U\mid Rank(f,x)>n-1/2\}=:V.\quad\square$
I would like to add that this implies that $f[U]$ is an $n$-dimensional submanifold: by the constant rank theorem every $a\in V$ has an open neighborhood $W\subseteq V$ such that $f[W]$ is an $n$-dimensional submanifold. But then so is $f[W]\cap W$, and we have $f[U]\cap W=f[f[U]\cap W]=f[W]\cap W.$