Usually, a dead battery will not harm your laptop if you leave it in. If the battery is completely ineffective, then no electricity will flow through it. And without electricity, there is not much of a chance for it to overheat or bust and cause you damage. So, you can leave it in and not worry about it too much.
Of course, it always needed a stable power connection and unable to carry along with. So, It was limited in that sense.
In rare cases, the battery may start to leak. At that point, it is a considerable threat to your pc and your own health. Battery acid is very corrosive and will burn your skin on contact. It may also seep into the interior of the laptop itself and cause damage.