If $Y$ is projective, at least the weaker question (indeterminacy locus is preimage of $Z$) has, I guess, a positive answer:
In this case, the rational/meromorphic map, call it $f$, is given by a linear system $|V|$ where $V \subset \operatorname{H}^0(X,L)$ and $L$ is some line bundle on $X$.
Let $\mathfrak b$ denote the base ideal of $V$, i.e. the image of the evaluation map $V \otimes L^{-1} \to \mathcal O_X$. Possibly after replacing $V$ and $L$, we can assume that the base locus $\operatorname{Bs}(V) = \operatorname{supp}(\mathcal{O}_X / \mathfrak b)$ has codimension at least $2$ in $X$. Under this assumption $\operatorname{Bs}(V)$ is precisely the indeterminacy locus of $f$.
Since $Z$ is an irreducible component of $\operatorname{supp}(\mathcal O_X / \mathfrak b)$, there exist ideal sheaves $\mathcal J, \mathcal K \subset \mathcal O_X$ such that
$$\mathfrak b = \mathcal J \cap \mathcal K, \qquad Z = \operatorname{supp}(\mathcal O_X / \mathcal J) \qquad \text{and} \qquad Z \not\subset \operatorname{supp}(\mathcal O_X / \mathcal K).$$ If $X$ is not assumed to be projective, use Siu's "Noether-Lasker Decomposition of Coherent Analytic Subsheaves". Otherwise you can also use the decomposition given by EGA $IV_2$ 3.2.6 (see also this MO question Primary decomposition for non-affine schemes).
By Hironaka, there exists a principalization of $\mathcal K$, i.e. a morphism $g \colon W \to X$ that is a composition of smooth blow-ups, such that the inverse ideal sheaf $g^{-1} \mathcal K$ is invertible, i.e. there exists a divisor $E \subset W$ such that $g^{-1}\mathcal K = \mathcal I_E$. Furthermore $g$ is an isomorphism over the complement of $\operatorname{supp}(\mathcal O_X / \mathcal K)$, in particular generically over $Z$. A good reference for this is "A Simplified Proof of Desingularization and Applications" by Bravo, Encinas and Villamayor U.: Principalization is Theorem 2.5 and after Theorem 8.3 the authors remark that it is also true for compact complex spaces.
Since $g^{-1}\mathfrak b \subset g^{-1}\mathcal K = \mathcal I_E$, the linear subspace $g^*V \subset \operatorname{H}^0(W,g^*L)$ is contained in the image of $\operatorname{H}^0(W,g^*L - E) \to \operatorname{H}^0(W,g^*L)$. Let $V_W \subset \operatorname{H}^0(W,g^*L - E)$ denote the preimage of $g^*V$ under this injection. Then the base ideal of $V_W$ is
$$\mathfrak b_W = \mathcal I_E^{-1} \cdot g^{-1}(\mathcal J \cap \mathcal K).$$ Clearly $\mathfrak b_W|_{g^{-1}(X \setminus Z)} = \mathcal O_{g^{-1}(X \setminus Z)}$, hence $\operatorname{Bs}(V_W) = \operatorname{supp}(\mathcal O_W / \mathfrak b_W) \subset g^{-1}(Z)$.