You can ride your Ebike if its battery runs out, but you must pedal it like a regular bike. But remember that compared to standard bikes, Ebike gets much heavier when they run out of battery. So it will be hard work to pedal it; try to ensure you have enough charge and can easily cover the distance.