There is ongoing research to see if there is a potential connection
between diabetes and Alzheimer's but it hasn't been confirmed yet.
It would depend on the cause of the dementia as to whether
its a condition that can be inherited or not.
Alzheimer's is also been dubbed diabetes type 3. When I read about the book Brain Grain by Dr David Perlmutter, it all clicked as to what was causing my cats dementia symptoms. Carbs! I got rid of all carbs in her diet and her dementia symptoms improved drastically although some mild behavioural issues remain. Plus she lost weight loss, her appetite improved, no more severely itchy skin or UTI infections and more energy. :)
Sweden's new dietary guidelines is low carb high fat or LCHF for short. This diet is popular for weight loss and is used for treating epilepsy and has been shown to reverse type 2 diabetes, improve symptoms of type 1, reverse fatty liver, improving heart health markers to name a few benefits. Diet Doctor has more info about LCHF.