Is there any way to treat a double ear infection without having to take off from school?

NO. Having an ear infection or treating it should not remove you from school. However if you are having significant pain or unable to hear that might cause you troubles in going to shcool.