CVS Health is battling Walmart over the cost of filling prescriptions, a clash that could result in a split between the retail behemoth and the health-care giant.