A Bertini-type result for hypersurfaces containing a subvariety Let $P$ be a smooth projective variety of dimension $4$ and let $Z$ be an irreducible subvariety  of dimension $2$ ($Z$ is not necessarily smooth, but you can assume it). 

Is there a smooth, irreducible ample hypersurface $H \subseteq P$ such that $H$ contains $Z$? 

I first tried to mimic Hartshorne's argument for Bertini theorem, but I could only prove the case when $Z$ is smooth of dimension $\leq 1$.
Then I tried to blowup $Z$ and take a general hypersurface on $\textrm{Bl}_Z(X)$. But I don't know how to control the regularity and ampleness for the pushforward of this hypersurface.
 A: For non-smooth $Z$ the answer is in general no.
Take $P=\mathbb{P}^4$ and let $Z \subset \mathbb P^4$ be a surface with a non-normal double point $p$ (i.e. a singularity locally analytically isomorphic to the one given by two planes intersecting in a single point, it is no difficult to construct irreducible examples, for instance taking general projections from smooth surfaces in $\mathbb{P}^5$). 
Then there is no smooth hypersurface $H$ containing $Z$, since the singularity $p$ has embedding dimension $4$.    

Added. Here is another counterexample, showing that the answer is in general no even if $Z$ smooth. 
Let $P=\mathbb{P}^4$ and $Z \subset \mathbb{P}^4$ be a smooth surface which is not a complete intersection (for instance, an abelian surface). If $H$ is any hypersurface containing $X$, by the Lefschetz hyperplane theorem the induced restriction map between Picard groups $$\textrm{Pic} \, \mathbb{P}^4 \longrightarrow \  \textrm{Pic} \, H$$ is an isomorphism. Then, if $X$ were a Cartier divisor in $H$, it would be a complete intersection there, hence a complete intersection in $\mathbb{P}^4$, contradiction.  
This shows that $Z$ is not a Cartier divisor inside $H$, hence $H$ is necessarily singular at some point of $Z$.
