That's not the rule. Of course, the best way to know the
rule is to read the source, but the summary of the rule
you quoted originally is adequate to explain the behavior you describe. (and your later summary is very different in practice).
Here's another rephrasing:
If you're not inside quotes of some kind, a hash symbol that
isn't inside another token starts a comment.