If a buddhist should not kill a mouse living in their home, what justification do they have to rid themselves of a parasite such tapeworms An extension of this question posted earlier:
How not to kill the mouse in my house?

Where does one draw the line for which forms of life are ok to destroy, and which ones are not? Is it just a calculation of causing the least suffering? A human has a more complex nervous system than a worm, so to reduce his suffering is paramount? 

I can think of many ways to spin the issue so that the human must allow himself to die, and ways to spin it so that killing living creatures is acceptable. Are there some general guidelines?
The Mahayana perspective on social and ecological ethics is based on the high ideals of symbiosis, harmony, and cooperation.

In the old times there were wandering monks who did not work and lived on alms - in return they shared the nectar of Dharma. They were no parasites. And if some of them were, Buddha encouraged the householders to be selective in choosing which monks to support.

Symbiosis is defined as a relationship beneficial to both sides. If the other side starts abusing its privileges to the extent that the relationship starts endangering your health and well-being, you have the right to withdraw your support. Meaning, you can stop feeding the beneficiary and let it find another sponsor. In the case of mice and other pests, this should be as simple as keeping your house clean and locking out access to food resources. In the case of the parasite, you can go on a 21-day fast; if worse comes to worst you have the right to expel.

As Trungpa Rinpoche explained, the samsaric approach involves solving the problems brute-force. The problem is solved at a very superficial level, the level of symptoms - but the root cause remains. No matter how much poison you waste on cockroaches, if your kitchen is dirty they'll keep coming back. In contrast with that, the Enlightened approach is to look in depth and solve the underlying problem. Prevent the problem altogether.

Violence is a low-skill approach. Instead, all arranged situations have supporting conditions they depend on. To the extent that you can identify and manage the supporting conditions you can control the situation.