I understand your concern and apologize for not answering this part of your original question. My answer is a bit convoluted. In short, lymphoma (cancer) in dogs does not appear to be contagious; however, there are other causes of swollen lymph nodes that are infectious if not contagious (passing from animal to animal).
Lymphoma is caused by or associated with a viral infection in some species (cats, cattle, chickens, mice, humans), but this has not been shown in dogs. Lymphoma is very common, but the incidence of lymphoma is not increased in dogs who live with affected dogs. There is evidence of a genetic predisposition in some dogs.
Some studies show a relationship between chronic inflammation and lymphoma. For example B cell lymphoma in a dog in one report may have been related to chronic infection with ehrlichia and histoplasma.
Histoplasmosis and Valley fever are fungi that can cause swollen lymph nodes. Infection results from contact with spores in soil. It is not generally considered contagious from animal to animal, but animals in the same household may be exposed to the same source. Richetsial infections (Ehrlichiosis, Rocky Mountain spotted fever), Salmon poisoning, cat scratch disease... etc.
Because lymph node enlargement can be caused by diseases (given in my first response) besides lymphoma, it makes sense to diagnose the cause of the swollen lymph nodes in your dog that is currently affected. An aspirate as described earlier would be a reasonable way to start. Make sure the lab doing the analysis for fungal and bacterial infections. If an aspirate does not provide enough material, a lymph node biopsy or removal with submission for histopathology would provide the needed material.