The rule about accidentally passing through things that cause damage in the glitchless category for this game is listed as:
"In case you pass through spikes, axes, etc. by accident, you must turn around and receive damage from them to keep the glitchless run."
Should I one day decided to try this run, I would like to know if I merely have to go back to the far (in the game) end of the hazard and take damage from it (which does slow you down for a while until you find another Jet hat) or if I actually have to go back to the near end of it, THEN take damage to keep the glitchless run. Perhaps it's OK if I take damage passing back through it as long as I get all of Wario past the near end, then presumably just walk under it as small Wario.
As for non-damaging things I might accidentally glitch through... I would actually prefer to go back to the near end and hit them to keep the glitchless run - I don't want to ever actually take advantage of anything considered a glitch by the community in ANY game's "glitchless" category! But is this an official rule for this game? Should it be?
Even if I never attempt any speedrun of this game, I would still like this clarified for other, future runners of this game. Maybe I can watch some videos in the "Glitchless" category to see this going back and taking damage to compensate for an unintentional glitch in action - probably more likely for the slower times where I would think this can happen.
The interpretation of the rule seems pretty clear to me: simply press the back direction to cancel the jet dash + take damage, and keep going. (If you just press A/B to cancel it, you don't take damage because you didn't move in the process.) I see no problem with then using the invincibility frames to sneak in a couple high jumps as small Wario to get through a little quicker.
As for clipping through ceilings, that actually behaves differently since it's caused by a different quirk of jet movement than spike dodging. You can tell if you are "clipped" into the ceiling if, when you cancel the jet dash while holding the forward direction, you pause for a brief moment before going forward. There are a couple pixels where you may look clipped into the ceiling but you actually are still in open air.
I honestly don't think there is any reason to punish yourself extra for making a simple mistake, especially since it won't gain time. If you find yourself clipped through a solid block, just cancel the dash (this may cause adverse side effects if you go for the ladder skipping in SC29, but nothing outlandish). As long as you aren't trying to get a dubious timesave in the process, it's all in good faith. And if you somehow accidentally go through spikes, just press the back direction and continue the run.
Unless you go for and get top two, nobody will care if you give yourself the benefit of the doubt. If you have clearly skirted the leaderboard rules, your run will simply be rejected and you can try again.
But this is assuming you make a mistake. Practice, practice, practice :)