Cats don't often get heartworms, and they are generally considered something that dogs deal with.
There's a possibility that your dog could have contracted heartworms after a month without preventative, but I honestly don't think you'd see such obvious symptoms this early.
The vet will listen to your dog's chest, take a blood sample to check for heartworms and provide you with more heartworm preventative as soon as heartworms have been ruled out.
Heartworms can infest and weaken the heart muscle.
Two months ago, my four-year-old dog went through treatment for heartworms.