This, in fact, varies between countries. Most countries treat electric bikes similar to regular bikes. But at least in some countries, there are rules specifying the maximum power output such bikes can have. And if it goes above that, the rules of a moped takes precedence. In the UAE, you are supposed to use safety gears, including helmets and high visibility vests if you are riding bikes in public areas. In areas that have dedicated bike lanes, use them instead of riding on the sidewalks.