A dog could die from eating a dead animal if the dead animal had any poison in their body or the dead animal died of some bad disease.
However if the dead animal had just died then it's unlikely the dog would would or be harmed from eating the dead animal.
Dogs, wolves etc all ate and eat dead animals all the time in the wild for survival so it's not always a bad thing if you dog did eat a dead animal.
However it's best to keep your dog away from any dead animals and do your best to prevent the dog from eating the dead animal.
If your dog did eat the dead animal though then just keep an eye on them for any health issues such as vomiting, diarrhea, weakness etc.
If you're worried you can take your dog to the vet.
But in most cases the dog who ate the dead animal will be just fine.