Yes, in today's society, being thin is generally considered a good thing, so statements that indicate that you look thin are usually intended as compliments. Some people make exaggerated statements like this ("You're so thin that you look like you are wasting away!") with the intent to highlight what they consider a positive attribute (thinness). I got compliments while I was losing weight but still obese, "If you lose any more weight, you'll blow away in a gust of wind!"
In some cases, people who genuinely care about you could be concerned that you are ill, especially if they don't know you had weight loss surgery, but if this is the case, they will usually approach you in a more private and sensitive manner, not just an offhand comment in public.