No the comorphism is not an isomorphism in general.
Here is an easy counter-example. Take $Z=M$ so that $i$ is the identity. Then $i_*$ and $i^{-1}$ are the identity functors, and $(Z,\mathcal{O}_Z)\rightarrow (M,\mathcal{O}_M)$ is a closed embedding iff $\mathcal{O}_M\rightarrow i_*\mathcal{O}_Z=\mathcal{O}_Z$ is an epimorphism. But by adjunction, this corresponds to the same morphism $i^{-1}\mathcal{O}_M=\mathcal{O}_M\rightarrow\mathcal{O}_Z$. So it is not be an isomorphism if $i^\#$ isn't.
However, the morphism $i^{-1}\mathcal{O}_M\rightarrow\mathcal{O}_Z$ is always an epimorphism as it is the composition
$$ i^{-1}\mathcal{O}_M\overset{i^{-1}i^\#}\longrightarrow i^{-1}i_*\mathcal{O}_Z\overset{\varepsilon}\longrightarrow\mathcal{O}_Z$$
where $\varepsilon$ is the counit. Indeed, the counit is an isomorphism because $i$ is a closed immersion, and $i^{-1}i^\#$ is an epimorphism because $i^\#$ is an epimorphism and $i^{-1}$, being a left adjoint, preserve the epimorphisms.
I think of $i^{-1}\mathcal{O}_M$ as the sheaf of function defined in a neighborhood of $Z$ (up to equivalence where two functions agree if they agree in a neighborhood of $Z$). And I think of $i^{-1}\mathcal{O}_M\rightarrow\mathcal{O}_Z$ as the restriction map.
This give a more concrete counter-example to your assertion, and answers the second question :
if $M$ is a manifold with $\mathcal{O}_M$ the sheaf of smooth functions on $M$, and $Z$ a closed point, then $i^{-1}\mathcal{O}_M$ is simply the germs of smooth functions at $Z$, whereas $\mathcal{O}_Z$ is simply $\mathbb{R}$. The map $i^{-1}\mathcal{O}_M\rightarrow\mathcal{O}_Z$ is then the evaluation at the point $Z$. Clearly this is onto, but this is not an isomorphism.