Does CCPA impact whether or not this is allowed?
Probably not. Public schools are divisions of state government and there are limits to how much the federal government can dictate the operations of state and local governments.
Limitations on whether public schools can monetize data collected from students (13+) would arise under state law. The state law could certainly expressly authorize the practice (and to some extent does already with profit generating sports teams and yearbooks). State law could likewise prohibit the practice. For the most part, state law is silent and it doesn't happen that much because it isn't very profitable.
Is there different guidance for public (government-managed and
nonprofit) vs private schools?
The legal analysis is very different. I'm not as familiar with this area of law, however, and will leave that question to someone else.
As a practical matter, private schools are in a very good position to obtain express consent to do so from parents and students, so that is usually how the issue is resolved, I suspect.