Let $X, Y$ be irreducible projective schemes over $\mathbb{C}$ and $X \subset Y$. Let $x \in X$ be a closed point. Assume that for any positive integer $n$ and any morphism from $\mathrm{Spec} (\mathbb{C}[t]/(t^n))$ to $Y$ such that its composition with the natural morphism from $\mathrm{Spec}(\mathbb{C})$ to $\mathrm{Spec}(\mathbb{C}[t]/(t^n))$ corresponds to the closed point $x$, we have that this morphism factors through $X$. Does this imply that there exists an open neighbourhood $U$ of $x$ in $Y$ such that $U$ is contained in $X$?



On infinitesimal neighbourhood of a point in a projective scheme
Suppose that $X$ has smaller dimension at $x$ than $Y$. Embed $Y\subseteq\mathbb{P}^n$ using a square of a very ample line bundle. For a general linear subspace $L$ in $\mathbb{P}^n$ through $x$ of the right codimension, $X\cap L$ will be finite and $Y\cap L$ will be a curve. Normalizing that curve and completing at some preimage of $x$ gives you a map $Spec(k[[t]])\to Y$, mapping the closed point to $x$, whose image is not contained in $X$. But then some $k[[t]]/(t^n)$ does not map to $X$.


The above shows that the answer is yes if $Y$ is reduced. See answer\_bot's comment below for a counterexample if $Y$ is non-reduced.


