The statement for effective divisors is not true, by the following well-known example.
Example. Let $Z = \mathbf A^1$ with variable $t$. Consider the group $\operatorname{Ext}^1_{\mathbf P^1}(\mathcal O_{\mathbf P^1}(1),\mathcal O_{\mathbf P^1}(-1)) \cong k$, and let $\alpha$ be a generator. Then the element $\alpha t \in \operatorname{Ext}^1_{\mathbf P^1 \times Z}(\mathcal O_{\mathbf P^1 \times Z/Z}(1),\mathcal O_{\mathbf P^1 \times Z/Z}(-1))$ gives a family of extensions $$0 \to \mathcal O_{\mathbf P^1}(-1) \to \mathscr E_t \to \mathcal O_{\mathbf P^1}(1) \to 0$$ over $Z$ that is non-split for $t \neq 0$ and split for $t = 0$. In particular, $$\mathscr E_t \cong \begin{cases} \mathcal O_{\mathbf P^1}(-1) \oplus \mathcal O_{\mathbf P^1}(1), & t = 0, \\ \mathcal O_{\mathbf P^1} \oplus \mathcal O_{\mathbf P^1}, & t \neq 0. \end{cases}$$ This gives a family $Y := \mathbf P_{\mathbf P^1 \times Z}(\mathscr E) \to Z$ of Hirzebruch surfaces such that $$Y_t \cong \begin{cases} F_2, & t = 0, \\ F_0 = \mathbf P^1 \times \mathbf P^1, & t \neq 0. \end{cases}$$ (There are also other ways to construct this degeneration of $F_n$ to $F_{n-2}$.)
Then all fibres satisfy $H^1(Y_t,\mathcal O_{Y_t}) = H^2(Y_t,\mathcal O_{Y_t}) = 0$, and the Picard groups are all free of rank $2$, generated by $g^*\mathcal O_{\mathbf P^1 \times Z/Z}(1)$ and $\mathcal O_g(1)$, where $g \colon Y \to \mathbf P^1 \times Z$ is the projection onto the constant family $\mathbf P^1 \times Z$.
But $Y_0 \cong F_2$ contains an irreducible effective divisor $C$ with $C^2 = -2$, whereas all effective divisors $D$ in $Y_t$ for $t \neq 0$ have $D^2 \geq 0$. So in particular, $C$ cannot lift to an effective divisor on $Y$ (up to an étale cover $Z' \to Z$ around $0$).
(Footnote: in the smooth case, the theorem of Totaro is a well-known result from deformation theory, going back many decades. The contribution is the specific generalisation to a certain mildly singular setup.)