No, that is not true. Consider the commutative ring $$R=k[x,y,z,t]/\langle xy+z^2-t,t^2\rangle.$$ The nilradical is $$N= \langle xy+z^2-t,t \rangle/\langle xy+z^2-t,t^2 \rangle.$$ Of course the quotient is $$R/N = k[x,y,z,t]/\langle xy+z^2,t \rangle = k[x,y,z]/\langle xy+z^2 \rangle.$$ Denote by $$q:k[x,y,z]\to k[x,y,z]/\langle xy+z^2 \rangle,$$ the standard quotient homomorphism. As an $R/N$-module, the nilradical is $$ N = \overline{t} k[x,y,z]/\langle xy+z^2 \rangle.$$

Now, for a given $k$-algebra homomorphism,
$$
\widetilde{g}:k[x,y,z]\to R,
$$
if $p\circ \widetilde{g}$ is the quotient $q$, then
$$ \widetilde{g}(x) = \overline{x} + a\overline{t}, \ \widetilde{g}(y) = \overline{y} + b\overline{t}, \ \widetilde{g}(z) = \overline{z} + c\overline{t}. $$ Since $xy+z^2$ is in the kernel of $q$, in order for $\widetilde{g}$ to factor through $q$, we must have the following relation in $N$, $$ 0=\widetilde{g}(xy+z^2) = (\overline{x}+a\overline{t})(\overline{y}+b\overline{t}) + (\overline{z}+c\overline{t})^2 = \overline{t} + (b\overline{x} + a\overline{y} + 2c\overline{z})\overline{t}.$$
Since $b\overline{x}+a\overline{y}+2c\overline{z}$ is in the maximal ideal $\langle x,y,z \rangle/\langle xy+z^2 \rangle$ and $1$ is not in that maximal ideal, there is no choice of $a$, $b$ and $c$ so that both $p\circ \widetilde{g}$ equals $q$ and $\widetilde{g} = g\circ q$ for some choice of $g$.

An excellent resource for this sort of thing is Mike Artin's "Lectures on Deformations of Singularities".