I'm so sorry to hear your news. It's an awful situation to face. We went through a similar ordeal with our boy Alfie recently. Wait for your test results, as you may be in a different situation...although it looks like a tumour, it might not be, so I'd make sure we had a diagnosis before making any decisions.
Alfie had anal gland cancer which was removed in November 2018. We always knew it would come back at some point. In late Feb 2019 he got very sick...lethargy, loss of appetite, diarrhoea. Blood tests revealed he was anemic. In fact it was an Auto Immune type of anemia (AIHA/IMHA). Cocker Spaniels are more likely than most breed to suffer from anal gland cancer and this type of anemia apparently. We treated the anemia aggressively and it looked as though we were about to win that fight. Unfortunately we discovered that the anemia was caused by the return of his cancer. We were treating the anemia symptoms, but if the AIHA is caused by another illness, then you have to treat the underlying illness. By the time we found the secondary tumour it was too late to do anything about it.
The anemia may be more critical right now, depending on the cause. It can be treated and managed, but needs to be treated aggressively. Alfie went from death's door to being allowed home in less than 24 hours once he started steroid treatment. We hoped that cancer wasn't the cause of the anemia...there can be other triggers such as allergic reactions, and some people report it happened soon after their dogs were vaccinated (although there doesn't seem to be a proven link.) In our case, the cause was the spread of his cancer.
In terms of when to say goodbye...we didn't rush. In the end the decision was easy to make and we did it quickly once we knew we had to. Alfie started trembling with discomfort. Not much, but there was a definite tremor. He hadn't needed pain relief before that point...he was just off his food a bit and would be lethargic from time to time. He had finally perked up, was eating properly and was no longer anemic when the vet suggested another Ultrasound to see if we could find any internal masses causing the anemia. We found a large tumour internally. Alfie looked great and was bouncing around the garden. How could he be doing so well but be so ill? Just the nature of this horrible cancer unfortunately. The vet gave us pain killers in case we needed them, but when he did start to have a bit of trembling and he was more reluctant to move (he had been chasing birds in the garden only two hours earlier) we knew that it was time. We went to the vet that evening and said goodbye. In the end he was just a bit uncomfortable. His pain killers didn't help much, so we knew we had made the right decision even though it was utterly heartbreaking. His tail was still wagging until the end, and he had a wonderful happy smile on his face when he left. He didn't suffer, and we knew he appreciated the extra time we had managed to get with him.
Looking back, I definitely wouldn't have had him put to sleep any sooner. I wouldn't have wanted to wait any longer either. It just felt the right time. We knew it, and he knew it. You'll know.