Is rest mass internal energy? Do we include $mc^2$ in internal energy $U$? Why for an ideal gas $U=\frac{f}{2}RT$ per $mol$ when relativistic mass is also internal even though it is fixed?
 A: In classical physics, which includes thermodynamics, mass is a conserved quantity. It is consistent with the rest mass of relativistic frames, because the velocities attained are  very very small with respect to the velocity of light . Energy and mass in the classical regime are only connected through the kinetic energy formula $= 1/2mv^2$. This is the frame work where thermodynamic quantities are giving the $U=\frac{f}{2}RT$ , for ideal gas.
When quantum effects have to be taken into account, as with atomic or nuclear energy levels the conversion of rest mass to possible other energy forms has to be taken into account, quantum thermodynamics :

Currently quantum thermodynamics addresses the emergence of thermodynamic laws from quantum mechanics

A: classically, internal energy is the sum of translational, rotational, and vibrational kinetic energies, and potential energies due to chemical bonds and IM forces of the molecules of a substance due to their random motion. Since IM potential energy of an ideal gas is 0, and molecular p.e remains constant (provided no chemical reactions take place), the internal energy is simply defined as kinetic energy.
Coming to your question, are you asking "should the energy associated with the total rest mass of the gas be included in internal energy"? If so, the question itself is wrong and you don't understand mass-energy equivalence. Mass-energy equivalence does NOT say that mass is a condensed form of energy; instead, it says that the rest mass (classically, a quantitative measure of inertia) is fundamentally caused by the Total energy of an object (excluding k.e of the object as a whole).
restmass-energy=k.e of molecules + intermolecular p.e + molecular p.e + nuclear potential energy + quark potential energy + gravitational p.e between particles......
So asking if restmass energy AND k.e of molecules should be defined as internal energy is  non-sensical as rest mass energy itself includes k.e of molecules.
On the other hand, if you're asking that internal energy should be redefined to rest-mass energy (only) so that it includes ALL of the above mentioned energies, I guess you can do so, but it doesn't really matter because classical thermodynamics is essentially concerned with changeable energy,  and the other energies don't really change in usual processes.
