There are a few things to unravel here.
The simplest thing to do would be to say that massless fields have massless excitations. However, this doesn't work because invariant mass doesn't add directly. For example, a system of two gluons can have a mass, as explained here, even though each gluon by itself is massless. This may be detected by the system's inertia.
As a result, you cannot assign an "invariant mass density" $\rho(\mathbf{x})$ to a field state. If you tried this with the two gluon example, it would be zero everywhere, since each gluon is massless, which is wrong. It also doesn't make sense for the classical electromagnetic field, since light in a box has mass.
To get a sensible result we have to restrict to single particle states with definite momentum. In special relativity, we define the invariant mass by
$$E^2 = \mathbf{p}^2 + m^2.$$
Using the de Broglie relations $E = \hbar \omega$ and $p = \hbar k$, and setting $\hbar$ to one, this gives the dispersion relation
$$\omega^2 = k^2 + m^2.$$
That is, the frequency $\omega$ of a single particle state with definite momentum is larger the bigger the mass of the field is, because of the rest mass contribution.