To me, there's a difference between middle-grade readers (elementary school) and middle schoolers -- so if I'd heard an agent/editor say that middle-grade swearing was unrealistic, I'd probably agree (for most kids -- there are always a couple here and there). But yes, middle schoolers definitely swear (usually more than some high schoolers around here, but I think that's because they want to appear 'cool').
I think swearing in MG books is usually rare (though I will admit I don't read a ton of MG since I no longer teach those grades). Even heavy swearing in YA isn't that common, and S is pretty rare, though h*ll and d*mn are more common. For a 9 or 10 year old stepping on a snake, I think a scream would be pretty realistic. For a 13-year old...maybe a yell or a *crap*. I think either of my kids (12 and 13.5) would say either crap or OMG. I guess I'd say there's a fair amount of leeway, so perhaps your character's voice/personality can determine it.