There is a famous story abt. the Chofetz Chaim who was asked about soldiers in the army who have to eat unkosher b/c that is the only available food. He said that it is permitted ..... but they shouldn't suck the bones.
Sometimes we HAVE to do something not so pure b/c of the extenuating circumstances. But we should try our best to minimize it.
Example: Yaakov told Yitzchak אנכי עשיו בכורך. Chazal say that he meant אנכי - I am Yaakov - and Esav is your Bechor. Of course he was still misleading Yitzchak [which he had to do for various reasons] but he minimized the falsehood by saying a sentence that COULD have been interpreted as truth.