The enclictic interrogative adverb -ne (aggregated to a word) and the "ne" word are two different words. (same etymological root, but both with separated grammar & meanings)
The other "ne", when it's separated, can be a preposition, or an adverb, meaning neither.. nor..., or, whether, etc, according to the other grammatical word you use with it:
Ne... annon/necne (+ subj) = is it... or no.
Ne... an = If... or if...