I have to find a ring $A$ that is not an integral domain, but such that $A_p$ is an integral domain for every prime ideal $p\subset A$.
Set $A:=\mathbb Z/6\mathbb Z$. Its only (prime) ideals are $p:=3\mathbb Z/6\mathbb Z$ and $q:=2\mathbb Z/6\mathbb Z$; neither $p$ nor $q$ contain other ideals, so $A_p$ and $A_q$ are fields. Does this example work? It seems ok but I wouldn't be surprised if I made some mistake. (From exercise 3.5 of Atiyah-Macdonald)