All perfect praise be to Allah
For the issue of who can leave the fast, medical condition is subjected to be life threatening (as mejority of ulama say).
Now, if he lose weight and doctors say it can be threat to his life, than he must not fast. Its as much obligatory for him to not fast as it was obligatory for him to fast when he was healthy.
Now, we don't know if doctor was a MUTTAQI(having fear of allah, and muslim) or he was a non-muslim, if a muttaqi doctor advices a person to not fast, he should not. But if a non-muslim doctor or a doctor who has no knowledge about islam is recommending not to fast, than we have to look up a few things.
Al-Nawawi said in al-Majmoo’, 6/261:
The person who is unable to fast because of a sickness which he hopes
will go away is not obliged to fast… This applies if he encounters
obvious difficulty in fasting and is not subject to the condition that
he reaches a point when he is unable to fast. Rather our companions
said: The permission not to fast is subject to the condition that
fasting causes him difficulties that it is hard for him to bear.”
Now in this specific case, its 22 pounds which is about 9/10kg. Which does not seem very much which might cause him any severe issues. So my advice is to have a discussion about this with a muttaqi doctor with all your reports etc. And if he also suggest you to not fast. Than you should not.
Also read What is the sickness which permits a fasting person to break his fast? fatwa for more clear understanding of who can leave fast because of illness.
It also depends on person's taqwa and will for ajar, because fasting of ramazan is very important, as i have heard a saying of prophet s.a.w.w that
(If a person does not fast for a single day in Ramadan, he cannot earn
the reward of this single day, even if he fasts all the year round
instead of it.) [Tirmidhi]
So, ramazan is very important don't take it lightly, but if a muttaqi doctor says you must not fast than you are practically not allowed to fast.
Hope it answers the question.
Allah knows best