Most likely it will be safe.
In most cases, lithium ion batteries contain a safety circuit that controls the charging. The charger in this case will be a constant voltage current limited charger.
I assume the safety circuit in the battery will kick in if you attempt to charge it unsafely.
If this is the case, you can pick any charger that has the same voltage and at least the same current. Lower current chargers might work but limit the charging speed.
This applies to batteries that have a safety circuit. Batteries such as lead acid and nickel metal hydride batteries do not have a safety circuit. Lead acid and nickel metal hydride require limiting the charging current at the charger. Lead acid batteries are charged with a constant voltage current limited supply where the current limitation has to be below that of the battery and the voltage is the absorption voltage, then when nearly full with the same supply but the voltage set slightly lower (float voltage). Nickel metal hydride is charged with constant current and with battery chemistry specific end of charge detection (usually with voltage limitation, voltage negative derivative and temperature limitation plus a timer limitation often as well). With nickel metal hydride you have to understand as well that end of charge detection with voltage negative derivative is unreliable at slow charge rates, so charge rate has to absolutely be between 1 and 2 hours or you'll reduce the life of your battery. But those chemistries aren't used in e-bikes.
However, in theory it's possible the specific battery and charger combination is designed in such a manner that the battery doesn't have current limitation in the safety circuit and it's the job of the charger to limit current. This would be fairly unusual, but I can't be certain some cheap Chinese brand wouldn't do this.