The statement for divisors is true. Indeed, up to an étale cover, we may suppose that $Z$ is affine and that $\mathscr L$ is a lift of $L$ to $X$. Take $\mathscr M$ on $X$ very ample relative to $Z$, and set $M = \mathscr M|_{X_0}$. By Serre vanishing, there exists $n \gg 0$ such that
$$H^1\big(X,\mathscr I \otimes \mathscr L^{\otimes i} \otimes \mathscr M^{\otimes n}\big) = 0$$
for $i \in \{0,1\}$, where $\mathscr I$ is the ideal sheaf of $X_0 \hookrightarrow X$. In particular, the maps
$$H^0(X,\mathscr L^{\otimes i} \otimes \mathscr M^{\otimes n}) \to H^0(X_0,L^{\otimes i} \otimes M^{\otimes n})$$
are surjective for $i \in \{0,1\}$, so if $D_0 \in \lvert L\rvert$ and $E_0 \in \lvert M^{\otimes n} \rvert$, then both $D_0 + E_0$ and $E_0$ can be lifted to divisors on $X$.
The statement for effective divisors is not true, by the following (well-known) example.
Example. Let $Z = \mathbf A^1$ with variable $t$ and set $Y = \mathbf P^1 \times Z$, with its structure map $f \colon Y \to Z$. 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_Y(\mathcal O_f(1),\mathcal O_f(-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 $X := \mathbf P_Y(\mathscr E) \to Z$ of Hirzebruch surfaces such that
$$X_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(X_t,\mathcal O_{X_t}) = H^2(X_t,\mathcal O_{X_t}) = 0$, and the Picard groups are all free of rank $2$, generated by $g^*\mathcal O_f(1)$ and $\mathcal O_g(1)$, where $g \colon X \to Y$ is the projection onto the constant family $Y = \mathbf P^1 \times Z$.
But $X_0 \cong F_2$ contains an irreducible effective divisor $C$ with $C^2 = -2$, whereas all effective divisors $D$ in $X_t$ for $t \neq 0$ have $D^2 \geq 0$. So in particular, $C$ cannot lift to an effective divisor on $X$ (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.)