We show that under these assumptions, $Z$ itself is a version of the conditional expectation $\mathbb{E}(Z \mid \mathcal{G})$ by confirming that the required properties hold. We have assumed that $Z$ is measurable in $\mathcal{G}$ which takes care of the the first condition. Next, fixing an event $G \in \mathcal{G}$ and applying the results
we have
\begin{equation}
\begin{split}
\mathbb{E}(Z I_G)
= \mathbb{E}(\mathbb{E}(Z I_G \mid \mathcal{G}))
= \mathbb{E}(\mathbb{E}(Z \mid \mathcal{G}) I_G)
\end{split}
\end{equation}
This completes the proof. $\square$