If it is in a 1 gang box then cut it into a 2 gang box-- one sp switch feeding the dimmer.
As I understand this proposal, the lockable SP switch would either power up the dimmer, or it would shut off the dimmer off and therefore shut off the lights as well. If so, is this what the OP wants to do?
Or does the OP want to keep the dimmer operating where it was set to, but prevent this setting from being changed?
A lockable cover of over the dimmer like those posted above would allow either of these two objectives to be done.
Another way to keep the dimmer function operating but keep it from being changed would be the following. Wire up a Maestro dimmer with a companion dimmer in one of the two ways shown below. But insert a lockable single pole switch in series with the blue wire. That would disable the companion dimmer from being able to change the dimmer setting when the SP switch is open. If desired, the main dimmer could be hidden behind a cover plate of some type so that its settings would only be controllable by the accessible companion dimmer. This proposal would have a total of 3 devices: Maestro dimmer, companion dimmer, and lockable SP switch.
They also make dimming modules that can be attached to a box but they are relatively expensive.