I haven't had to do this yet, but I would be quite happy to change someone else's child if she wet or messed her pants. I'm sure the child would be quite happy to have a caring adult comfort and change her after such an accident, and most parents would surely prefer their child to be changed by the friend's parent rather than be left in dirty pants or get a phone call asking them to collect their daughter early.
In fact, I think I would be embarrassed to call up the parents and ask them to take their child home because I couldn't deal with cleaning a pooey bottom!