Worm infections cannot be regarded as trivial. Infection with, say, the pork tapeworm may cause no symptoms in some patients. In other patients, the larval form of the tapeworm can disseminate through the body (cysticercosis) and this can be very serious or fatal.
Similarly, worldwide, Ascaris worm infection is common and often without symptoms. but the worms can migrate, eg to lung, and you can die of ascaris pneumonia.
This is why it is important that proper diagnosis and treatment is made. Do not rely on herbal or folk remedies. Seek medical help as soon as you get back to civilisation. Threadworms are an exception - they are common, trivial and as Rich had said, can be eradicated if you stop eating the eggs.
Even in the UK there are some serious worm infections. Toxocara canis can cause blindness and the dog tapeworm can cause serious liver problems (echinococcosis)
Do not ingest cigarettes. Although a study of accidental cigarette ingestion by children of up to 2 cigarettes did not cause any serious disease, it did cause a lot of nausea and vomiting, etc, and you don't want this in the wilderness. Ingestion of more than two cigarettes, or water in which cigarettes have been steeped, have been associated with serious toxicity. In addition I could find nothing in the medical literature to indicate that tobacco or nicotine is effective in helminthic (worm) infections.