According to English grammar, if an auxiliary verb ("to do", in this case) is present, it is the only one that conjugates, while the main verb remains in the bare infinitive form.
The sentence with "if" does not have an auxiliary verb, so in that case the verb "know" conjugates; while in the sentence with "does", "know" stays in the infinitive form. Consider:
Anyone knows; if anyone knows; maybe anyone knows;
Anyone does not know;
Does anyone know?;
Anyone does know;
Although the form "subject + does + verb" is not popular, it is pretty grammatical. This form is principally used to emphasize a fact, particularly to contradict a previous assertion, with emphasis on "does":
"I don't think anyone knows."
"This can't be. Someone does know!"*