Your condition implies that there is a nondecreasing function, $\phi_a\colon\mathbb R_{\ge0}\to \mathbb R_{\ge0}$ such that
$$|a-x|_S=\phi_a(|a-x|_M).$$

One can reformulate it the following way, if you fix a point $a\in S$ then the angle between chord $[ax]_M$, $x\in S$ and the tangent space $T_xS$ depends only on the distance $|a-x|_M$.  

This is quite strong global condition. 

In particular if $S$ is a hypersurface then all its ponts are umbilical. In higher codimension, at each point, the absolute value of the curvature vector in all directions has to be the same.