That's very interesting. I've not seen a Bafang like that before. The bearings are probably standard and possibly removable, though you might need a bearing puller to get them out and a press or strong vice to put them in.
Does the clutch still work? Normally that's the first thing to go when water gets in and it goes rusty. You should be able to get a replacement, as it looks fairly standard, but if you need gears, bearings and a clutch, it might be better to get a replacement motor.
Before anything, you should check that the hall sensors work. For that, you need a voltmeter to check the 5v pulses on the three hall signal wires when you turn the motor. You need to supply 5v on the red and black wires for that (+ and - on the pcb).