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$?
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 nonreduced.

3$\begingroup$ This argument only works if $Y$ is reduced. A counter example to the question is $\mathbf{C}[x, y]/(x^2, y^2) \to \mathbf{C}[x, y]/(x^2, xy, y^2)$. $\endgroup$ – answer_bot Apr 24 '14 at 20:05

$\begingroup$ answer_bot: of course, thanks for spotting that! $\endgroup$ – Piotr Achinger Apr 24 '14 at 21:19