I'm digging up this post a little late with a different answer :)
Since $A$ is integral, $(0)$ is a prime ideal and $\mathrm{Spec A} = \overline{\{(0)\}}$ is irreducible. Moreover, the localizations of an integral domain remain integral domains and it follows that $\mathrm{Spec A}$ is reduced.
Now in a reduced scheme $X$, for any non-empty open subset $U$, $f \in \mathcal O_X(U)$, $f = 0$ in the ring $\mathcal O_X(U)$ iff $f(x) = 0$ for all $x \in U$ (in the non reduced cased, this would only make $f$ a nilpotent element on affine opens). In the affine case where $U = \mathrm{Spec} R$, this means that $f =0$ if and only if $f \in \mathfrak{p}$ for all $\mathfrak{p} \in U$ i.e $f(\mathfrak{p}) = 0$ for all primes $\mathfrak p$ of $R$.
Take some non-empty open subset $U$ of $\mathrm{Spec A}$, and suppose that $f,g \in \mathcal O_X(U)$ are such that $fg =0$. Then by the above, we have that $f(\mathfrak{p}) = 0$ or $g(\mathfrak{p})=0$ for any $\mathfrak{p} \in U$.
It is a general fact about locally ringed spaces that $V_f = \{x \in U \mid f(x) = 0\} = \{\mathfrak{p} \in U \mid f(\mathfrak p) = 0 \}$ is a closed subset of $U$, and the same goes for $V_g$. We have decomposed the open subset $U$ as :
$$U=V_f \cup V_g$$
Since $U$ is a non-empty open in the irreducible space $\mathrm{Spec A}$, it is itself irreducible this means that either $V_f = U$ or $V_g = U$. Say $V_f = U$, then $f (\mathfrak{p}) = 0 $ for all $\mathfrak{p} \in U$ which, by reducedness once again implies that $f = 0$ in $\mathcal O_X(U)$ and we are done.