For a $C^1$-function $u$ defined on a two-dimensional hypersurface $M$ we can define the tangential gradient as $$\nabla_Mu=\nabla \tilde{u}-(\nabla\tilde{u}\cdot n)n$$ where $\nabla$ denotes the usual Euclidean gradient, $n$ being the unit normal and $\tilde{u}$ being a smooth extension of $u$ to a neighborhood of $M$.
Now there is a Lemma that the tangential gradient only depends on values of $\tilde{u}$ on $M$. The proofs I have seen start like this: "It suffices to show that $u=0$ on $M$ implies $\nabla_M u=0$."
Why so?
Lemma is likely “the tangential gradient only depends on values of $\tilde u$ on $M$”. ($u$ is defined only on $M$.)
The proof comes the linearity of the formula:
$$ \nabla_M (u_1+u_2) = \nabla(\tilde u_1+\tilde u_2) + (n\cdot\nabla(\tilde u_1+\tilde u_2))n=\nabla\tilde u_1 + (n\cdot\tilde u_1)n + \nabla\tilde u_2 + (n\cdot\tilde u_2)n = \nabla_M u_1 + \nabla_M u_2 $$
So if you have proved that $u=0 \Rightarrow \nabla_Mu=0$, then every smooth extension will give you the same result (since their difference is smooth and equals zero on $M$).