Very basic question about localizations
Set $A=\mathbb Z_6$ and $S=A\setminus 3\mathbb Z_6$. Then $\hat 2$ is a zerodivisor in $A$ and $\frac{\hat 2}{\hat1}$ is not a zerodivisor in $S^{-1}A$. (Actually it is invertible in $S^{-1}A$.)
Set $A=\mathbb Z_6$ and $S=A\setminus 3\mathbb Z_6$. Then $\hat 2$ is a zerodivisor in $A$ and $\frac{\hat 2}{\hat1}$ is not a zerodivisor in $S^{-1}A$. (Actually it is invertible in $S^{-1}A$.)