Many ebikes have two safety circuits to keep you from fully discharging the battery. One is in the battery. There's also often one in the motor controller. Stand alone controllers typically have one. Some integrated controllers may not. When present. both are set for a safety margin. One of these circuits should activate and keep you from the dreaded/dangerous full discharge.
For reference, I believe the absolute minimum voltage on a battery made with 18650 cells is 25 volts for a 36V battery and 32.5 volts for a 48V battery. From what I've seen, the safety circuits are typically set around 6 and 8 volts higher. If you run it down to where the bike shuts down, you should be safe.
The safety circuits can't catch all the battery failures, but work reasonably well for batteries made with quality cells.