Let consider the motion of the centre of mass of the Earth and moon system (Figure). The moon moves round the Earth in a circular orbit and the Earth moves round the Sun in an elliptical orbit. It is more correct to say that the Earth and the moon both move in circular orbits about their common centre of mass in an elliptical orbit round the Sun.
For the system consisting of the Earth and the moon, their mutual gravitational attractions are the internal forces in the system and Sun’s attraction on both the Earth and moon are the external forces acting on the centre of mass of the system.