Not quite.

Anyway, when you get the huge pop up saying "This will result in excommunication", its only sometimes true.

When under threat of excommunication or otherwise, you are allowed to do the following without consequence (besides losing some relation points with the pope):

- Attack anything that is within one of your own province's borders, including: Attacking an allied/neutral/enemy arms within your borders that is just passing through, raiding or besieging.

- Attack any settlement that does NOT have any defenders.

- I am hazy on this one, but I think you are also allowed to lift any blockades of your own ports.

Anything else is disallowed.