I'm not sure that this is what you're looking for, but you can constrain an object to another. Select the constrained object first, then the other and go in the animation menu, Constrain > Geometry. Your object will now only move following the surface of the other.