Yes, if the cancerous tumour can be surgically removed while leaving the rest of the liver in a functioning state. Or if there is a healthy liver than can be safely transplanted. There are operations where just the diseased 'slie' of the liver is removed, leaving the rest to repair and continue to function.
The survival rates are not too bad following surgery. Some lucky patients have lived up to twenty years after surgery for their cancer. Many live for up to ten years after surgery. If the cancer is allowed to progress without treatment, then of course the outlook is grim.