There is a counterexample with $d=1$ and $m=n=2$. Here is one way to construct such an example: Let $g:\mathbb{R}\to\mathbb{R}$ be a smooth function such that $g'(t)>0$ for $t\not=0$ and $g^{(k)}(0) = 0$ for $k\ge 0$. Now, define a smooth mapping $f:\mathbb{R}^2\to\mathbb{R}^2$ by the rules
$$
f(x,y) = \begin{cases}\bigl(0,yg(y^2{-}x^2)\bigr) & y^2>x^2 \\ \bigl(0,0\bigr) & y^2 = x^2\\ \bigl(xg(x^2{-}y^2),0\bigr) & x^2>y^2\end{cases}
$$
Note that the differential of $f$ vanishes identically on the locus $x^2=y^2$, but it has rank $1$ everywhere else. The image of $f$ lies in the union of the $x$ and $y$ axes. In fact, note that the mapping $(x,0)\mapsto f(x,0) = (xg(x^2),0)$ is injective, with nonvanishing derivative except at $x=0$, with a similar statement for $(0,y)\mapsto f(0,y) = (0,yg(y^2))$.
I claim that the point $(0,0)$ does not have an open neighborhood $U$ on which there exists a smooth map $\pi:U\to\mathbb{R}$ and a smooth map $\iota:\pi(U)\to\mathbb{R}^2$ such that $f(x,y) = \iota\bigl(\pi(x,y)\bigr)$ for all $(x,y)\in U$. To see this, assume that $\pi$ and $\iota$ exist with the specified properties and note that we can assume without loss of generality that $\pi(0,0) = 0$ and that $U$ is the open disk $x^2+y^2 < r^2$ for some $r>0$ and $\pi(U) = (-s,s)$ for some $s>0$. Because of the above noted behavior of $f$ restricted to the $x$ or $y$ axis, it follows that $\iota$ must be a injection that is an immersion except at $0\in\pi(U)$. From this it is easy to see that $\iota(\pi(U))$ for $r$ sufficiently small must be contained in both the $x$-axis and the $y$-axis, which is clearly impossible.