Yes. Chickens can get and die of cancer. Ovarian tumors are very common in hens (about 30% of hens by 2.5 years). Mareks disease will cause tumours. Lymphoid leukosis is vertically and horizontally transmitted and will cause tumours.
Not sure whether what you're showing in her leg is a tumour or not.
There are a number of diseases that will cause both/either/none of the two symptoms that you said your rooster and hen had. Mareks and Mycoplasma Gallisepticum are two that come to mind.
It could all be a coincidence too... the only way to know is to get a necropsy. Short of that, keep an eye on the remaining flock members for any symptoms. Hopefully both were unrelated and coincidental deaths and there are no more issues.