I'm pretty sure it's not okay to take some random dirt without composition tests, even in pre-industrial times. It can contain feces, organic acid, etc.
Well, at least the kid was honest. That humiliation was terrible for a child of her age, she lost 4 times, but still accepted it and even admired Celestine.