Given a locally ringed space $(X,\mathcal O_X)$ and a global section $s\in \Gamma (X,\mathcal O_X)$, which does not vanish at any point $x\in X$, meaning the image of $s$ in the stalk $\mathcal O_{X,x}$ does not belong to the maximal ideal of the local ring $\mathcal O_{X,x}$, does it mean that $s$ is invertible as an element of the ring $\Gamma (X,\mathcal O_X)$? In other words, if $s$ is invertible stalk-locally, does it mean that $s$ is invertible?
It is easy to see that if $s$ is locally-invertible in the usual sense, then it is invertible, since the uniqueness of the inverse guarantees that the local inverses can be patched together. It is also easy to see that for schemes, the answer is yes, since for an affine scheme this follows from the fact that an element of a ring that does not belong to any prime (or maximal for that matter) ideal is invertible. But is it true in general?
REMARK: I couldn't find batter tags. Feel free to edit.