There is an appearance by a civilian police organization called Federation Security in Star Trek III.
Tellingly, it's still a federal organization, at least unless the name is misleading. No local police forces to be seen anywhere on Earth, not in ST3 or VOY "Non Sequitur" or any other instance involving crime on Earth. Nor on other UFP planets for that matter.
And whatever the role of "Federation Security", it delivers its perps to a Starfleet gaol, or at least a gaol guarded by personnel wearing Starfleet insignia.
Have we ever had a reference to a civilian court of justice? Or did those get outmoded when it was decided that criminals are simply ill people who have to be sent to asylums for treatment?
Timo Saloniemi