Let $X$ be a smooth projective variety over $\mathbb{C}$ with $\dim X=3$ and $\mathrm{Pic}(X)=\mathbb{Z}\cdot D$, where $D$ is a very ample effective Cartier divisor on $X$. Let $Z$ and $C$ be two Cohen-Macaulay closed subschemes in $X$ such that $\dim Z=\dim C=1$. Assume that $C\subset Z\cup D$, and $Z$ intersect both $C$ and $D$ properly.
Now assume furthermore that $|C|\subset |D|$, i.e. $C\subset D$ as topological spaces.
Question: Is it always true that $C\subset D$ as schemes? How about assuming furthermore that $D$ is normal integral and Gorenstein?
In this case $D$ is also Cohen-Macaulay, hence $I_{Z\cup D}=I_Z\cap I_D=I_Z\cdot I_D=I_Z\otimes I_D$. And by assumption, we have $I_{Z\cup D}\subset I_C$ and $\sqrt{I_D}\subset \sqrt{I_C}$. Then we can find an integer $n\geq 1$ such that $I^n_D=\mathcal{O}_X(-nD)\subset I_C$. But then I am not sure how to show $n=1$...