To reproduce, use /enchant or /seed in a world with disabled cheats (for example a hardcore world).
Non-operators can do /enchant
Enchant command does not require operator permissions
Player is able to use /enchant in vanilla multiplayer without op
If cheats are disabled, you can still use them.
All players have access to /enchant without being opped in 18w07c