No, dogs cannot get heartworms from drinking water with mosquito larvae. Heartworms are transmitted to dogs through the bite of an infected mosquito. The mosquito must bite an infected animal, such as a wild dog or coyote, and then bite a domestic dog or cat in order for the heartworms to be transmitted.