The short answer is no. Sugar itself does not inherently cause diabetes. Diabetes in hamsters is controlled by two things - genetics, and obesity. Genetics refers to the actual DNA of the hamster. If your hamster’s parents developed diabetes, there is a high chance your hamster will as well. This is very similar to Type 1 diabetes in humans. There is nothing you can do to prevent it, and while diet might help in some ways, these hamsters do require veterinary assistance, and should receive regular insulin injections to ensure best quality of life.
Obesity linked diabetes is caused by diet and poor exercise. Essentially, an obese hamster is more at risk of developing diabetes, which is similar to our type two diabetes. Same with people - obesity can lead to diabetes. Obesity can absolutely be caused by refined, processed sugar in LARGE AMOUNTS coupled with excessively fatty foods. Will a piece of fruit automatically give your hamster diabetes? Absolutely not. Will a yoghurt drop give your hamster diabetes? No.
Russian campbell dwarfs, Chinese hamsters, and hybrids are all prone to diabetes. While it is encouraged for all species of hamsters to stay away from overly processed treats and refined sugar - it’s not going to give your diabetic-prone species diabetes. A little treat once and a while will do no harm.
Another animal that is prone to diabetes is humans. Do you personally limit your amount of fresh fruit to ensure you don’t get diabetes? I highly doubt it. Fruit is also high in fibre, and other vitamins and nutrients.
To take this further, all sugar is a carbohydrate. Carbohydrates come in many different forms. What does a carbohydrate do for your body? Carbs are brain food, they provide short and long term energy and maintain our blood sugar levels.
The two “main” forms of carbs are complex and simple carbs. Complex carbs provide healthy, long term energy. Whole wheat bread, pasta, potatoes, etc. They release energy slowly, contain vitamins and minerals, and are more complete. One big aspect to these carbs is they contain dietary fibre. There is soluble fibre, which attracts water and slows digestive. Insoluble fibre resists water and bulks up your digestive tract, allowing you to feel full. Fruit, though a simple natural carb (see below), is especially high in dietary fibre.
In comparison, you have simple carbs. These have two main categories - refined, and natural. Refined simple carbs are essentially your “candy” of the carb realm. THIS is the type of carb that should be avoided by critters and humans alike - but, it’s a treat. They have high amounts of calories and usually act as sweeteners - think corn syrup, brown sugar, etc. You’ll find this in candy and sugar. It’ll provide a quick boost of sugar, but holds little nutritional value.
Natural simple carbs are ones that not only provide that quick boost of energy, but also give you vitamins and minerals. These include some fruit, sugar-free juice, and dairy milk. Fruit especially holds many vitamins and minerals, and also serves the purpose of providing complex carbohydrates in terms of dietary fibre.
In fact, fruit does not have a high glycaemic index (the thing that makes blood sugar go up) so even humans with diabetes can eat it. Should they eat a whole cantaloupe? Probably not, but an apple (or, a piece of apple, in hamster terms) isn’t going to hurt them. Fruits and veggies both help our bodies to reduce the risk of many health conditions including high blood pressure, heart diseases, strokes, obesity and certain cancers. So arguably, it’s more important to eat more fruits and vegetables for diabetic humans - same can apply to hamsters.
So, why are we comparing fruit to candy bars? They are very different things, and fruit, will not, and will never, cause diabetes in a dwarf hamster.