The internal energy of a body is the summation of internal potential energy and internal kinetic energy.
Internal potential energy is the total potential energy because of the interactions between each pair of particles constituting the body.
Internal kinetic energy is the energy associated with the microscopic movements(rather motion) of the molecules of the body.
What your textbook tries to define is perhaps the internal kinetic energy. Because, roughly we can say that if in a frame of reference the center of mass of the body is not in motion then all the kinetic energy of the body in that frame will be due to the microscopic motion of its molecules - which is internal kinetic energy. But that is not actually a perfect definition for the internal kinetic energy. The reason is that if the body is not a perfectly rigid body then there may exist macroscopic motion of some parts of the body and still we can have the center of mass at rest. So all we can say about the internal kinetic energy is that it is the energy associated with the microscopic motions of the molecules of the body. Which is essentially a function of the temperature of the body.
The internal energy of a body remains the same independent of your frame of reference. (Neglecting relativistic effects, of course.) Because the internal potential energy depends upon the internal geometry of the body which is same in all the frames. The microscopic motion is more or less random and thus the kinetic energy content associated with this random motion is same in all the frames.