What kind of cancer does your friend have? Many types of cancer are completely curable, especially if caught in an early stage. Even some cancers that aren't totally curable are very manageable, like a chronic illness, and can be kept under control for many years.
Of course it is scary to think of losing someone close to you, however, I would wait and see if your friend wants to talk about the possibility of dying or not. Some people want to concentrate on getting well, especially at first, and don't want to start thinking negatively. Try to listen to her for cues as to what she needs to talk about, and if you are having major problems dealing with the scary possibilities, find someone who can counsel you (either a therapist or another friend). But please, before you start concentrating on your friend's possible death, find out whatever you can about her cancer...you may not need to worry about losing her at all!