Answer
In the first case, yes, in the second case, no.
Work Step by Step
The forces between the colliding bodies during the short collision time are much larger than any external forces (e.g., the force of the hand propelling the racket), so we may treat the racket and ball as an isolated system and the momentum is conserved. This is discussed on page 247.
However, if we wait two more seconds, then external forces (most notably, gravity) have a significant amount of time to act, providing impulses that change the system’s momentum.