The answers are yes, and no, respectively. Note that when systems are not isolated (or when one talks about the mass of a piece of an isolated system) talking about the mass of such non-isolated system requires a lot of care. The answers to such questions are not observer-independent. (So to make sense of any answer in such cases, one has to specify a lot of details about the observer and the measurement process.)Imagine that we have a solid pressure vessel enclosing an ideal gas. We heat the gas up with an external source of energy, adding an amount of energy E to the system. Does the mass of our system increase by E/c2? Does the mass of the gas increase by E/c2?