Yes, they could. Babies very rarely have cancer, so it isn’t very common, but it is possible. There is a type of cancer called teratoma, some types of which are actually a baby which turns into a tumour.
Very rarely, babies can develop cancer before birth. Another way of this occurring is if the baby is exposed to radiation in the womb. Either way, though, very rare. Also congratulations for Iain’s disgusting answer – I didn’t know that!
I don’t KNOW the answer to this, but this is what I think:
Usually cancer takes a very long time to develop – years. So I reckon that it’s unlikely cancer could develop fast enough to kill a baby before it’s even born. But, in very rare instances, babies can have cancer; so perhaps it is possible for a baby to die of cancer in the womb.