Some of the things I feed my ill rats who are losing weight is plain full fat yogurt (no sugar or additives). I also feed them pure nut butters, the ones that are only nuts. Almond is our most used, I eat it too. If blended with the yogurt it makes a nice treat and cuts the butter so it isn't so sticky they choke.
Any carbs are seen by the body as fuel, cancers will often take those carbs and use them up before the body can use them. Proteins however are processed by the body and seen as building blocks and used for growth and repair (repair like is needed if the body is scavenging muscle). It is much harder for cancers to use proteins as fuel as the body will use them first before converting them to carbs for fuel or fat for storage. For an emaciated rat, all the protien is likely to be used. Ditto for fats, if you give a rat good fats, the body will use those fats to build itself.
Avocado is another favorite of my rats. I know some people don't think it is good for rats but my guys never have troubles. Cooked egg or fish is another favorite. Fish canned in oil, like sardines is quite a treat, I just wonder if the can itself might have toxins, but you can always cook fish scraps from the grocer and add your own fresh oil.
These are just a few of the things I use to maintain weight on my guys if I suspect cancer might be rearing it's ugly head. There are supplements out there - hepato support and renal cat that you can get from the vet to support rats with either liver or kidney issues. Although they are made for dogs and cats, you can reduce the dose to give your ratties. Often with kidney issues, giving a really high quality protein like egg or fish doesn't stress the kidneys further because there is less waste from those high quality proteins.