Honestly, I think there's contradictory evidence both ways and different writers had different ideas for it. One had it as SPECTRE and the other had it as Project: Treadstone and the other had it full-on as the CIA.
But that's no fun an answer.
I do think it means we have to pick what "our" answer is.
My preferred take? Section 31 is a part of Starfleet but it's only known to Flag officers and above and has a lot of black budget (easy enough with replicators and a post scarcity economy) as well as very little oversight. It often breaks the Federation's laws in the pursuit of its ends and frequently goes above and beyond its mandate but someone, somewhere signs off on things like the Founder plague despite genocide being the ultimate no-no.
But that's no fun an answer.

I do think it means we have to pick what "our" answer is.
My preferred take? Section 31 is a part of Starfleet but it's only known to Flag officers and above and has a lot of black budget (easy enough with replicators and a post scarcity economy) as well as very little oversight. It often breaks the Federation's laws in the pursuit of its ends and frequently goes above and beyond its mandate but someone, somewhere signs off on things like the Founder plague despite genocide being the ultimate no-no.