I had a situation like this in my game.
I was at war with Bismarck, and I was allied with a city-state (I forget which, let's call it Bob). Eventually I got peace with Bismarck. Then I tried to get Bismarck to make peace with Bob, but when hovering over Bob in the "make peace with" menu in trade, it said Bob had declared permanent war on Bismarck, and so it was impossible.
My only option to save Bob seemed to be to wipe Bismarck off the map, however I had just made peace with him and so I could not declare on him until the treaty was over. By that time, I'm sure Bob would have been conquered (again). So, I put six units around Bob's city. Bismarck shelled Bob every turn with artillery and had a ring of units two deep around my units, around Bob's city. It was impossible for Bismarck to conquer Bob, and impossible for me to do anything other than sit there in his way.
The permanent war feature doesn't feel right to me. Maybe if I'm allied with Bob I should be able to get him to call off the permanent war.
Also, the AI needs to be smart enough to know that it has to kill you to get to Bob. This gameplay felt pretty degenerate to me.