Sorry to hear this! I think a lot of how long they live afterwards depends on whether the mass is malignant or not. My neighbor’s elderly sheltie mix had her spleen removed and lived about 6 months afterwards, but she had malignant hemangiosarcoma which eventually spread to the rest of her body (lungs, heart, etc). The spleen removal itself did not cause her death.
I have heard of other people whose dogs had a benign mass removed and lived a normal lifespan, but those stories seem to be fewer. Jolie had what we think was most likely a benign mass (she had it for quite some time with no symptoms of spread) but because she had other health issues at the time (she was 14 when we found out about it) we opted not to put her through surgery. As far as we know, the mass never burst or spread but it did eventually grow large enough to make her feel lousy enough not to want to eat, move, etc.
So to answer your question, I think it depends on a) whether or not the mass is malignant and b) your dog’s overall health. Best of luck with whatever you decide!