Answer by
quisqualis (1756)
If the person is clearly dead, then there is no emergency, and the plane might not deviate from its initial flight plan. However, it is normal to not fly with a dead person in the cabin, if it is safe and convenient to stop at the nearest airport and have the body taken off the plane. That is customary.