That is not universaly true. In my state, you can modify between class 1, 2, and 3 as long as you permanently affix the correct sticker.
If the device is able to be set to an off road mode, then it is excluded from the definition of an eBike in the first place no matter what mode the user...