I assume she was never spayed? Stories like yours are so tragic since mammary cancer is preventable if puppies are spayed before they ever have their first heat cycle.
I would consult an oncologist, but I do know that most mammary tumors are malignant.