All laptops should (note I say should, as some manufacturers can be iffy) be able to run on the charger cord only, without the battery.
That said, they are made to hold a battery, and the charger cords are made to send enough power to both power the device and charge the battery at the same time.
So, while you can do it, personally I don't think it is something you should do for extended periods. In the short term it again 'should' be fine, but eventually you should really consider a new battery.