The rule to differentiate is exactly as you describe: if you want to modify a noun, use a preposition; if you want to introduce or modify a sentence, use a conjunction or adverb.
Since 'during' is a preposition, and 'while' is a conjunction/adverb, use them for the functions they fit to.
As to why there are two distinct words for the same situation (other than part of speech), one can only make the general observation that language is logical only except when it is not. If the past tense of 'sing' is 'sang', why isn't the past tense of 'bring' 'brang'? One could ask why are there synonyms when one form would do?
It turns out 'During' is a borrowing from Norman (Old French), the present participle of 'to last', but 'while' is from Anglo-Saxon, a noun meaning 'time'. The cultural contexts of these two were separate and only slowly did the converge on a very similar menaing (but not part of speech).