The simplified model here explains why the friction force acting on the bottom of the ball is sometimes observed to reverse direction during the bounce. See  Am. J. Phys. 70, 1093-1102 (2002). The cart can oscillate back and forth during the bounce due to the action of the spring (or due to the elastic properties of the ball or of the surface on which the ball bounces).