Yes they can. It all depends on the policy. For example USAA routinely insures service members and those policies have a rider for dying in combat. And it is only a couple buck for a month on a normal $500k policy. When I retired I took that rider off.
Pretty much any insurance company does the same.