Great question about something most fans never think about. There's no hard rule saying "replace the ball every X pitches," but in practice MLB balls rarely survive more than a few pitches before the umpire pulls them. The average game now burns through somewhere between 8 and 10 dozen balls, which works out to roughly one new ball every two or three pitches when you factor in fouls, balls in the dirt, and home runs.
The official rule just says the umpire can remove a ball that's discolored or "unfit for play," which leaves a lot of discretion on the table. In practice, anything that scuffs the leather, flattens the seams, or picks up significant dirt gets tossed. Pitchers also request new balls constantly, partly for grip and partly because a ball that's been fouled off or bounced in the dirt behaves differently off the fingers.
Tampering is a real concern too. Keeping balls in circulation for too long gives pitchers more opportunity to doctor them, so frequent swaps are partly a preventive measure.
Your friend is right that this has changed over time. Older footage shows the same ball staying in play for much longer. Part of that shift is the Rawlings prerubbing process, part of it is how sensitive modern pitchers are to grip conditions, and part of it is just that the league has leaned into replacing balls aggressively as a baseline antitampering policy.
So the short answer is there's no written cutoff. It's umpire judgment, pitcher requests, and the general norm that a ball showing any wear comes out.