(They would, however, need to make it work without having pockets. But I believe in them...)
I'm sure we can invent Pick-Pocket resistant Pockets into the uniforms.
Yes, you heard me.
A knife doesn't only have to only have a basic Pocket Knife Functionality.
Think about all the crazy things you can include given how compact 24th century tech and beyond is.
Ultra-Sonic Vibro Blade for enhanced cutting edges.
Thermal Blade for Hot Knife on the go to slice through anything that needs a little extra heat applied.
Electro Blade incase you to need to electrocute the thing you touch.
Shield Blade for pairing force fields with your blade to give it the toughness to block beam / bolt blasts without destroying the metal, or have a Phantom blade capabilitiy where it extends the length of the blade via Force Field Projection in the shape of a blade.
So a retractable or fixed 3" knife blade could become a 3' or 3 meter blade with enough energy pumping through it via the built in Shield Emitters into the blade.
Given that many shields in the TNG era were invisible, you can see the advantages of having a blade's length that is deceptively short, yet fast to slash and thrust with while looking like they're the size of a Pocket Knife, but have the length of a sword or pole arm.
Or combine multiple functions like Vibro / Thermal / Electro / Shields in any combination for special effects when applied to the target.
A little like my pocket .380: discreet protection.
How many rounds do you have with a Pocket .380, what's your Muzzle Energy for the type of Ammo you carry?
I'm pretty sure that by the 24th century, you'd want to upgrade to a Type-1 or Type-1½ class Phaser that carries more shots, more Muzzle Energy, etc.
I've already upgraded traditional FireArms in my 26th Century Head Cannon to have Anti-Matter Lead Explosives for StarFleet within the core of the Bullets with Tritianium Tipped Jackets and Penetrators for mass production.
So every bullet is effectively a Bullet Propelled Photon (M/A-M) Grenade of significant yield depending on your caliber of ammo.