when a cup of water is at rest, does the potential energy between water molecules contribute to the rest mass or just the kinetic energy of the molecules? Also, is it the same as asking whether the total internal energy of a resting system = the rest mass of system? Thank you
Short version: the mass of the system is (modulo an uninteresting factor of $c^2$) the same as the total energy of the system computed in a frame where it has zero total mometum (therefore including contributions from the mass of the parts, the kinetic energy of the parts relative the center of mass and the potential energy of the system but not the kinetic energy of the center of mass).
Notably, the mass of the system is generally not the same as the sum of the mass of its parts (though it is impractical to measure the difference in most cases).
You should keep in mind that the electromagnetic potential energy of a condensed fluid (like liquid water) is generally negative. That is the energy of a drop of liquid water is less than the energy of the same set of molecules with the same speed taken far from each other.