If something is on the edge of something else, it is usually resting on the surface of it, so your interpretation of "the milk is on the edge of the desk," is correct.
You would not use that expression to indicate someone is standing very close to you. You could say something like "we are shoulder to shoulder." You can use "edge" as a verb to mean to move slowly in small steps toward something. He edged closer to me until we were standing shoulder to shoulder.