I am not sure that I agree that the dog's behavior necessarily demonstrates "morality." You might be anthropomorphizing a bit. I am not a biologist or anything, so I could be way off base... But is it not possible that the dog was acting on instincts to protect newborn offspring? Similar to when animals "adopt" babies from other species as their own?
Morality implies that the dog did a thing because it's "the right thing to do," when in reality, it might have just been a self-preservation instinct kicking in. Dog sees newborn that's clearly the offspring of the being that takes care of it, dog tries to preserve that newborn's life in order to keep the gravy train going.
Just my (again, non-expert) thoughts.