Short answer: Terminal is already on your Mac, and four commands lock the Dock. Nothing to install, no admin password.
Each lock is one command followed by killall Dock.
Open Terminal from Applications, then Utilities, and run the ones you want:
defaults write com.apple.dock size-immutable -bool true; killall Dock
defaults write com.apple.dock position-immutable -bool true; killall Dock
defaults write com.apple.dock contents-immutable -bool true; killall Dock
defaults write com.apple.dock autohide-immutable -bool true; killall Dock
Size, position (which edge), contents (the icons) and hide and show. These write to your own account, so they need no administrator rights, and they survive a restart.
defaults read com.apple.dock size-immutable
It answers 1 when the lock is on. Then open System Settings, Desktop & Dock: the locked control is grayed out and the divider no longer drags.
Swap true for false, or delete the key and the Dock goes back to normal:
defaults delete com.apple.dock size-immutable; killall Dock
If a control is grayed out and you do not remember locking it, here is how to tell a lock from a managed profile.
The same four locks are switches in Still Dock's menu bar, with Touch ID to unlock and a memory of the Dock you had before you locked it. Locking the size is free. The ways to lock a Dock, side by side, are in three ways to lock the Mac Dock.
No. These settings belong to your own account, so a standard user can set and undo them.
The commands change only your own Dock preferences. They do not install anything and they do not touch the Mac's managed settings.
Yes. The four keys are unchanged. Only the settings panel moved, as covered in how to lock the Dock on macOS 26.