Fasting is a very important element of various religions; Muslims, Hindus, Sikhs, people from Jain and Asian Buddhists all fast at various times during the year. It is an obligatory duty but breaking it is allowed if the fasting would make an illness worse, or delay recovery from an illness. This is because an illness causes harm and causing harm is forbidden. So if someone fasts when it might make their illness worse, or slow their recovery from an illness, then his or her fast would not be valid.
For someone like your mother, who has an advanced cancer, the likelihood is that fasting during Ramadan would either be forbidden, or they might have the choice of whether to fast or not. In making this decision they would need to know whether fasting would risk worsening their condition, or increase their chances of dying sooner from the cancer. Getting the advice of their doctors on these questions is allowed, even though their doctors may not be Muslims. The guidance that is being sought is medical, not religious, and it is then up to the patient, and their family, to decide whether or not to observe the fast.
Also, in some illnesses simply delaying fasting until the patient recovers is acceptable. But for people who have advanced, incurable cancer, the usual guidance would be that they should permanently avoid the observation of fasting during Ramadan, although it is possible to compensate for this by making gifts of food to the poor.

