I'm not going to allow my friend to keep staying with me so he can go to school
Could they still go to school if they lack a place to stay?
Probably, but I think it is better not to have a friend who is unwilling to move on with his or her own life.
The fact that you let your friend stay in your home to help them is a boon to them. It's okay not to want to house your friend any more than is necessary so that they don't get too complacent.
I was fine with letting them stay at first. I can do it for a few days more.
It sounds like your friend might be getting too comfortable with this living situation, and that it is causing problems for you, so it's okay to draw the line.  However, you should do what you can to help your friend transition into a new living space, so that he doesn't have to disrupt his studies.  That way he can truly move on in life.