Hi Dave, I’ve had experience with this - my rescue foster dog (now adopted by me) had her rear leg amputated. It was not cancer but had been broken as a puppy and some idiot never had it set. She is fine - my vet said dogs do great with 3 legs. Of course, the cancer is another complication for you to consider. I recommend you visit Tripawds.com for support and information. They are a wonderful community and there is tons of information, videos, suggestions, etc.
One thing I do tell everyone is to ask your vet about prescribing Gabapentin for phantom pain. I had some rough days before getting this and it takes a day or so to start working. Wish I had it just in case before symptoms surfaced. Feel free to message me with any questions.... Don’t give up - many dogs live long, happy lives after this surgery!
(a bit off topic, but...) I just read an article about using “mirror therapy” for phantom pain for amputees. I wonder if it would work on animals.