A necessaryNecessary and sufficient conditionconditions for your question to have a positive answer isare that $A$ be equidimensional$\textit{unmixed}$, that is, every associated prime is a minimal prime, and $\textit{equidimensional}$, that is, $\mathrm{dim} (A/\mathfrak{p}) = \mathrm{dim}(A)$ for every minimal prime $\mathfrak p$. This eliminates exactly the phenomenon in Charles Charles Staats' example is not equidimensional. The one-dimensional ring $A=k[x,y]/(x^2,xy)$ is not unmixed, and $A/(y)$ has dimension zero. Sufficiency follows from the fact that the set of zerodivisors of $A$ is equal to the union of the associated primes.