Ruler disagrees with vertices
Ruler use the Global coordinates

As you already pointed out in your question, the difference comes from the using of Local coordinates instead of Global.

While the Global coordinate of the vertex is its "true position" in the 3D space, Local coordinates are giving you the position of the mesh component as if it would not be affected by the object's transformation.

If we consider for example a 200x200 square plane, and set the object's scale to 0.01, the Global position of the corner vertices would be something like (1;1;0)... while the Local position will stay untouched (object's scale is uneffective) resulting in something like (100;100;0).

The rulere is giving the "real" distance bewtween two points, located where they currently are in the scene, so by comparing the Global coordinates, not the Local.