On all the Teensy 3.2, 3.5, & 3.6, you can turn on the code security lock by editing FSEC in mk20dx128.c.
But read the comments carefully regarding the caveats of using the code security lock. The main issue is the Program button behavior changes. Normally it just enters programming mode. If you touch it accidentally, you can always just power cycle the board. Nothing gets erased or changed until you actually upload with Teensy Loader. But when security is locked, pressing the button causes a full wipe of all flash and eeprom memory. Of course, if you do this and then upload new code with Teensy Loader, then that's good. But if you accidentally touch that button when security is locked, all your code is fully erased.