Solution (source code)

= Solution

Since $|Z_tY_t|\leq C Z_t$ and $Z$ is uniformly integrable, the continuous local martingale $ZY$ is locally in Doob's class and hence is a true martingale. For $A\in\mathcal F_s$ and $s\leq t$, <Bayes formula for conditional expectation> gives
$$
\widetilde{\mathbb E}[\mathbf1_A Y_t]
=\mathbb E[\mathbf1_AZ_\infty Y_t]
=\mathbb E[\mathbf1_AZ_tY_t]
=\mathbb E[\mathbf1_AZ_sY_s]
=\widetilde{\mathbb E}[\mathbf1_A Y_s].
$$
The bounded process $Y$ is integrable under $\widetilde{\mathbb P}$, so this is exactly the martingale property.