It all depends on whether you are a massist or an energist.
------
A massist is willing to attribute mass values to anything, in any state of motion. For a massist, this m is really m0, a mass attributed to something in its rest frame of reference. For a massist
E2 = p2c2 + m02c4
p = mv
are always true in any inertial frame. For light quanta,
E = pc
p = mc
, because m0 = 0 for light quanta. But m = p/c = E/c2, a mass value dependent upon total energy of a quantum.
So E = mc2 is true for a light quantum as well as a particle with a non-zero rest mass.
------
An energist is willing to attribute energy values to anything, in any state of motion. For an energist, m can only be attributed to something in its rest frame, so the subscript 0 is never needed. For an energist,
p2 = E2/c2 - m2c2
is always true in any inertial frame. The energy E must come from other physics. For light quanta, p = E/c is a given, so
p2 = p2 - m2c2
, so
m2c2 = 0
. Since c > 0,
m = 0 for a light quantum.
So, E = mc2/(1 - v2/c2)1/2 only in the case of a particle with non-zero rest mass.
------
Most modern day physicists, especially high-energy physicists, tend to be energists rather than massists.