I'm sorry about the cancer concern.
I wouldn't think so. The coughing is just part of the cancer since the lungs aren't functioninig appropriately. Of course, someone with cancer can have a virus like a cold, and that would be contageous, as with anyone else.
Take care of the caregiver and the care receiver - both are important.
Both Carol and Christine gave you good answers. I want to add that since your interest here is Alzheimer's, you should also know that the person with Alzheimers in late moderate stage can get choked by water or food. So if the person has both cancer and Alzheimer's, the cough could contribute to the choking shortly after eating and therefore it is not contagious. This situation could last quite a long time like 2 years or more. Pureed food helps. Cancer is not contagious. However, if the person happens to have a cold or flu, then the cough may be contagious.