Yes a laptop will work just fine without the battery installed in the laptop as long as you use the original power cord to power the laptop.
I have an old laptop that the battery went bad on and I just removed the old battery and use the laptop on the counter in my kitchen when I want to look up recipes and I just leave it plugged into the power outlet.
The laptop has been working just fine without the battery for a few years now.
The battery when removed does no harm to the laptop except making the laptop less portable but you can still take the laptop with you and plug the laptop into a power source when you have a power source available to you.
There's no reason to get rid of a laptop because the battery went bad and you can't afford a replacement battery as you can just leave the battery in the laptop or just remove the battery and keep the laptop working with the power cord.