Beth, I do not believe that heartworms are contagious. Your dogs should be just fine.

Logan