I'm not sure if the paper is fine or not, but if you're worried I would just stick them in some clean dirt for a couple of days as you suggested. I doubt it'll do much once its flushed from their systems. I suspect that as far as toxins if the worms survive it fine the frogs won't be too hurt by it.