Worms in the nasal passages would be extremely rare, but a couple of cases of pin worms enterobius vermicularis have been reported (see http://www.ijohns.com/article.asp?issn=0019-5421;year=2005;volume=57;issue=2;spage=148;epage=150;aulast=Kaniyur). This would not be the only possible cause of parasites in the respiratory tract, however. For example, another type of roundworm, Ascarids, can infect the lungs in humans, and the juvenille worms can crawl into the respiratory tract and out of the nose. There's also a possibility that you're suffering from some kind of mite or other insect (scabies, louse, etc). Parasites such as these are nearly impossible to diagnose without experience in medicine or parasitology--though what you see and experience coming out of your nasal passages and ears may be very real, the interpretation of what you're seeing and feeling may be more difficult to determine, especially when it comes to self treatment. A microscopic examination and/or smear might be required in this case, as there might be a co-occuring infection accompanying your symptoms, which needs to be treated as well. Treatment will depend on the exact nature of the problem. For example, certain roundworms like pinworms and ascarids can be treated with mebendazole or albendazole oral medications (available OTC in some areas), and steroids, but fungal or bacterial infections would require completely different remedies.
I hope this helps!
You're correct in that the pinworm eggs can be ingested and inhaled and contracted in this way, but they thrive in the rectal environment and crawl to the anus at night to lay eggs. This is just the environment that they're most adapted to, and is at the perfect temperature, moisture level, and nutrient environment for them to live in. Finding them elsewhere has been documented, as you know, but it's sort of like finding a monkey in a desert... a little odd for this organism. As I mentioned, however, there are other types of worms that could be possibly found in the respiratory passages. The good news is that the oral medications that kill pinworms are also good at killing other types of parasitic worms, so hopefully, whatever you have will resolve with the mebendazole you've been given. If not, a specialist needs to examine a sample more closely to identify your sample, look for the presense of eggs, infection, irritation, etc. Understandably, I can imagine how frustrating this might be, having a mysterious and confusing ailment that your doctor seems to have no real answers for at the moment...but each step that you try will bring you a little closer to getting rid of this likely annoying problem.
Let us know how the mebendazole works, and the results of any future ENT visits (it doesn't cost anything to reply to this post)... I think you've aroused the curiosity of many of our experts here.