You really have to check local ordinances before assuming any legality.
I just happened to have a brochure for a nearby rail trail, and was looking closely for any mention of e-bikes.
"No motorized vehicles allowed, except for motorized wheelchairs, electric, pedal assisted bikes that meet the provisions of Federal Electric Bicycle Law HR727"
Not knowing there was any type of law regarding e-bikes, I looked up HR727, which, in part, defines a class of e-bike.
Electrically driven bicycle has less than 750 watt motor
Functional pedals
Max speed is less than 20mph with 170 lb person on board
So, it looks like electric scooters, or any electric powered moped without pedals, or anything faster than 20 MPH is a no-no.
I wonder if it's possible to soup up an electric wheelchair?