The Buddha taught Non-Violence not Pacifism - https://www.buddhistinquiry.org/article/the-buddha-taught-no...
In Hindu (eg. Mahabharata) and Buddhist (eg. Jataka tales/Counsel to Kings) traditions, you are allowed to use Adharma temporarily as a last resort to re-establish Dharma itself. You cannot escape the Karma thus generated but it is condoned and accepted as a necessity.
My other comments in this thread has already elaborated on this.