Would this be a 'full' poop or some staiining of his underwear,many children dont wipe properly and also they are especially at this age, embarressed to ask the teacher to go to the bathroom,so have a chat with him, make no big deal of it.It sounds like he needs to be in control of when he goes, does he do this at home aswell as that will tell you if it is a problem at school .good luck
Has he been constipated prior to this? Often they can have impacted stool that they can't pass, and this results in the other stool remaining in a semi-solid form and it can just leak out without him even knowing. I would take him to his doctor, they can often feel it by pressing on his tummy or by taking an xray. If he/she doesn't know, take him to see a Pediatric Gastroenterologist. At this age it's very embarrassing for him so I seriously doubt he's doing it on purpose. Good luck and take care!