^Depends. If you go by the books--Section 31: Cloak
has Kirk look up the Federation Starfleet Charter--Section 31 (presumably of Article 14). Lo and behold, said section establishes an "autonomous investigative agency" with broad discretionary powers over non-specific matters.
Also...there's been a theory that the "unsanctioned" state of Section 31 isn't "actual": it's an issue of plausible deniability, a la the IMF of Mission: Impossible
. ("As always, if any of your team is caught or killed, the secretary will disavow any knowledge of your actions.") Connecting that with the Charter...you have black ops at its finest. 31, then, would actually be a branch of SI--which was precisely what Sloan described it to be. SI "officially" disavows any knowledge of its activities--and so on.