One other case is that you leave your planet and start attacking prewarp worlds in Federation space. This is the case I’m not sure of. They’d probably be forced to let you do it.
IIRC, this is why the Federation didn't intervene in the Cardassian occupation of Bajor. The Prime Directive forbade it.
Although it does raise a point, why didn't Bajor call for help? As I understand it, the PD allows the Federation to render assistance to any planet which requests it, whether or not the inhabitants possess warp drive or are even aware of the Federation's existence. So even if Bajor didn't have warp drive (and by all accounts, they didn't), any distress calls they sent out could be answered.
I guess the Cardassians had some method of jamming any distress signals the Bajorans could send, but surely there were Bajorans who managed to get out of their home system safely (smuggled out, perhaps, like the Underground Railroad). Could they have asked for Federation assistance? Like the refugees in "Ensign Ro", for example.