Yes you can buy Hartz Worm medicine at Walmart for cats or dogs. Walmart carries the worm medicine in either liquid and in the tablet forms for about $5.00. The price may vary with the size of box you get.
Heart worm medicine is not sold at Wal-Mart. Your pet has to be tested for heart worm before the medicine can be administered. If the medicine is given to an animal with heart worm it can be fatal. Your vet has to do the test and that is where you will have to buy the medicine.