If we define the system as the ball plus earth, then gravity is an internal force, so there is gravitational potential energy and no work done by the earth.