Yes, for example if $K \subset L$ is an inclusion fields, then the induced map
Spec $L \to $ Spec $K$ is a homeomorphism (both source and target are single points),
but the induced map on sheaves is the given inclusion of $K$ into $L$, which is 
surjective only if $K = L$.

For another example, let $X'\to Y$ be a closed immersion of schemes over ${\bar{\mathbb F}}\_p$, and let $X \to X'$ be the relative Frobenius morphism.
Then $X\to X'$ is a homeomorphism on underlying topological spaces but is not an isomorphism of schemes, and so the composite $X\to Y$ is a closed embedding on underlying spaces but not a closed immersion of schemes.

As one last example, let $X'$ be the cuspidal cubic given by $y^2  = x^3$ in the affine
plane $Y$ (over $\mathbb C$, say), and let $X$ be the normalization of $X'$ (which is just
the affine line).  Then $X \to X'$ is a homeomorphism on underlying spaces, but is not
an isomorphism of schemes.  The composite $X \to Y$ is thus not a closed immersion,
but induces a closed embedding of underlying topological spaces.