Yes, it does seem to be an odd thing that some medical professionals do - tell diabetics not to eat [some basically randomly chosen food!]. An otherwise lovely doc told me not to eat pork. (I mean - really!)
I live with a gallstone - I think it has gotten smaller as the attacks have decreased hugely over the years I have lived with it (an informed decision made with gallbladder specialist). So I have apple cider vinegar (ACV), and, fresh apple pieces in cooking from time to time, to help with that, and it has seemed to work. There is an acid in apples, I can't remember what, which has an instant affect on gallstones, if playing up, and may contribute to keeping the gallbladder nice and well functioning (along with eating dietary fats to keep the bile swishing through there regularly). (I got the gallstone the same time as the type two - on a high-carb low healthy-fat high processed food way of eating.)
With my own children, along with diabetes prevention strategies, I stress if they can stand a heavy dose of ACV, to do that, to avoid the ghastliness of gallstones. And, 'An apple a day keeps the doctor away', I believe, probably came from the gallbladder protecting actions of that acid that occurs naturally in apples.
But no, sadly, as a very carb-intolerant person, my days of eating a whole apple are long gone.