Concepts: general considerations regarding length measurements in GIS
Before seaching for a way "how to measure correct distances", the conceptual question "how do we define 'correct' disctance" should be answered. It includes, of course, Earth's shape - but which model of it? A sphere (very rough approximation), an rotational ellipsoid/spheroid (closer to the reality), the Geoid (quite close, but difficult to handle). What about topography/relief? Should mountains and valleys be considered or not? Or is the distance to be meant for an airplane? Then the vertical distance (cruising altitude - of up to 12.000 meters above ground for commercial flights) should also be considered - or just the vertical distance?
As you see, even conceptually, it's not so easy to say which one is the "real" distance. For practical use, probably the best (in the sense of returning good results while still easy to handle) is using ellipsoidal distance - reducing the Earth's shape to a rotational ellipsoid (as is the case with most projections used in GIS) and then calculating the distance on the surface of this three dimensional model (spheroid).
See also here for the concept of ground distance, used in survey.
Measuring ellipsoidal length with QGIS
If you use a software like QGIS, you can make ellipsoidal length-measurements that return more or less accurate real-world distances even for Mercator-projections.
See the following example for the distance from Berlin to Rome: when set to Ellipsoidal, the distance measurement returns 1183.64 km - this is more or less accurate (based on the points projected to the WGS84-ellipsoid). When you check the Cartesian checkbox, the distance shows as 1752.9 km: quite a difference, almost 50% longer! This last value reflects the heavy distortion of the Mercator projection and thus returns no useful measurement.
Calculation of ellipsoidal distances in QGIS is also possible using the expression $length for a line as this respects the current project’s ellipsoid setting and distance unit settings. First create a line that connects the two points, then apply $length.
