^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.
"The saying implies but does not name the effective agency of its supposed utopia.... 'Needs and abilities' are, of course, subjective. So the operative statement may be reduced to 'the State shall take, the State shall give'."