Apology doesn't = humiliation, being MADE to say something is humilating - I was excrutiatingly shy as a child, and being made to say 'thank you for having me' after a party made me want to curl up and disappear (weird child) so after that I'm hugely wary of MAKING DD say anything. Nevertheless, she already (nearly 4) see s 'sorry' as a 'get out of jail free' card - say 'sorry', carry right on.
It's hard to say - I wouldn't do what the OP did (for the record, I'd go in, hand the item back, say 'sorry, but DD is very little and doesn't understand about paying', having hoisted DD up to hip so I know she's listening', and give her the lecture on paying and ownership at some point). But it's not such a dreadful thing to have done.
Oh, how we beat ourselves up.