In Lee's book "Introduction to Smooth manifolds", he following lemma can be found. Lemma 8.26 Let $M$ be a smooth manifold, let $S\subseteq M$ be an embedded submanifold, and let $Y$ be a smooth vector field on $M$. Then $Y$ is tangent to $S$ iff $Yf$ vanishes on $S$ for all $f\in C^\infty(M)$ such that $f|_S=0.$
My question is what if $S$ just an immersed submanifold? Is the same conclusion true? It should be because earlier Lee proves that any immersed submanifold is locally embedded submanifold. But why does Lee state the theorem only for embedded submanifod?
Another example of an immersed but not embedded submanifold. Take $F: \mathbb{R}\to \mathbb{R^2}$ defined by $$F(t)=\left(2cos\left(t-\frac{\pi}{2}\right), 2sin\left(t-\frac{\pi}{2}\right)\right)$$ Then $(F, \mathbb{R})$ is an immersed submanifold of $\mathbb{R^2}$ but not an embedded submanifold of $\mathbb{R^2}$.
It looks like this and goes through the origin twice as the leminiscate loops around itself: