There are several conceptual confusions here. Mass is irrelevant. This is purely a kinematical question, it does not depend on dynamics at all: so.
The difference between Lorentz's (and Fitzgerald's and Larmor's) approach to the Lorentz--Fitgerald contraction (and Larmor time dilation) on the one hand, and Einstein's revolutionary and conceptual breakthrough, the relativity principle, is precisely that Lorentz and the others thought of the contraction as somehow being a property of matter and dynamics and forces, it was a property of a material body. It was Einstein (and Poincaré) who realised that no, this is a property of space-time itself, of the geometry of space-time. It happens even for massless points not even connected to each other by a body at all.
So you could suppose the Universe is completely empty---no mass or energy, completely flat Minkowski space. For simplicity, suppose there is one spatial dimenion, $x$, and one time dimension, and the velocity of light is unity, and $ds = dx^2 - dt^2.$
If one co-ordinate system has its origin moving at the speed of light with respect to the origin of another co-ordinate system, one of them must fail to be an inertial reference frame. They cannot be connected by a Lorentz transformation.
This is a kinematical theorem which does not depend on what dynamical law of motion Nature employs: it only depends on the principle of relativity. (It is true in General Relativity also, but has no importance there because in GR we do not care about whether a co-ordinate system is inertial or not.) So we cannot use a Lorentz transformation to compare what is seen by an observer travelling along with a photon with whast is seen by another observer for whom that origin is moving at the speed of light.