NOTE: I am taking rings to be commutative and unital.
$A$ is a ring. I am trying to find a counterexample to: $A_p$ integral domain $\forall$ prime ideals $p$ in $A$ $\implies$ $A$ is an integral domain.
I have seen some people on this site suggest $k^2$ for a field $k$, specifically $k = \mathbb{Q}$.
$k^2$ is clearly not an integral domain so $(0)$ is not a prime ideal. Hence the only primes are $k \times \{0\}, \{0\} \times k$. In fact these are maximal because $k^2 / k \times 0 \cong k$ is a field.
Now, localizing a ring at a maximal ideal should give that same ring back, i.e. if $m$ is a maximal ideal then $(A-m)^{-1}A$ will only have units as denominators essentially giving $A$ back...
I do not see why this is a counterexample then since $A$ was not an integral domain to begin with. I think I am making a silly mistake, thank you for your help!
Edit: I realize my characterization of localization at max ideals only works for local rings.
Edit 2: Still not sure I get what the localization, say, $(\mathbb{Q}^2)_{\mathbb{Q}\times0}$ ends up being...