Let (X, O_{X}) be a ringed space and let A —> O_{X} be a surjection of sheaves of algebras. Let S ⊂ A be the subsheaf of local sections which map to invertible functions of O_{X}. Then S(U) is a multiplicative subset of A(U) for every open U of X and we can factor the map as

A —> S

^{-1}A —> O_{X}

If X is a locally ringed space, then the stalks of S^{-1}A are local rings too.

This construction is occasionally useful. For example, consider a fibre product of schemes W = X x_S Y with projections maps p : W —> X, q : W —> Y, and structure morphism h : W —-> S. Then the map

A = p

^{-1}O_{X}⊗_{h-1OS}q^{-1}O_{Y}—-> O_{W}

is not an isomorphism in general, but a localization: with the notation above we have S^{-1}A = O_{W}.

A related remark: this construction (without the initial surjectivity assumption) is also used by Illusie to show that the cotangent complex of a ring A coincides with the cotangent complex for the ringed topos X = Spec(A). (One uses the transitivity triangle + the fact that the map A —-> O_X is a localisation in the sense of your post, so has a trivial cotangent complex by a formal argument.)