No, dogs cannot directly transmit heartworms to one another. Heartworms are spread exclusively through mosquitoes, which act as intermediate hosts for the parasite.
When an infected mosquito bites a dog, it deposits microscopic heartworm larvae into the dog's skin. These larvae then migrate and develop into adult heartworms in the heart and blood vessels, where they can cause serious damage.
Dogs only become infected through mosquito bites and cannot spread the infection to other dogs or humans through direct contact.