No, it is not allowed to take a folding bike on a plane and that is all because it has a battery. It is not allowed to take any battery larger than 1000Wh. Though some airlines may allow you, you have to seek permission for the same.