Dreaming that you have cancer doesn't mean you actually have one. Perhaps you have an unresolved issue that you perceive extremely serious, but you feel you either can't do anything about it, or it would need a serious, long struggle which might leave you drained.
What type of cancer you had in your dream? The affected organ might tell more about the issue. For example if it's skin it could mean your interaction with the outside world. If brain it could be self-control.
Ofc it can be a number of things and I can't tell you what it means to you, only you can solve it. Abstraction and association of ideas are important.