I’m not sure exactly about the conditions needed for a subset $S$ to localise a ring $R$. I know $S$ has to be multiplicative. But does $S$ also have to be a subset of the non-zero divisors of $R$ or does it have to be a subset of the group of units of $R$?
I can’t find a clear answer.
Localisation is defined for any commutative ring with identity $R$, and for any multiplicatively closed subset $S \subset R$: $1 \in S$ and $s,t \in S$ implies $st \in S$.
In fact the inclusion homomorphism $R \rightarrow S^{-1}R$ is injective if and only if $S$ contains no zero divisiors, and $S^{-1}R = 0$ if and only if $S$ contains $0$.