Your understanding is correct, it's z-values vs distances.
A depth map contains the distances of points in the scene to a plane.
A range image contains the distances of points in the scene to another point. This point is very often the camera's position.
For a depth map the plane that the distances are computed with respect to can be any plane, but it is often parallel to the image plane. Examples of common planes:
- The image plane
- The focal plane
- A plane closer to the object, such that the points closest to the camera have distance zero.
If you of the same scene have:
- A range image with the distances to the camera
- A depth map with the distance to the image plane
these two images will look very similar, and it's not possible to conclude whether it's a range image or depth map, unless you have something you know is a plane in the image.