A good rule of thumbs with rat diet, if its safe for humans to eat, then it's usually safe for rats. However, there are some foods which should absolutely be avoided:
Dried / Uncooked Beans – this particularly includes Kidney Beans and Soya beans (can be fed fresh e.g. . Beans contain high levels of antinutrients when dried and these can interfere with the digestion of other foods. Some beans such as kidney beans can be quite toxic when dried.
Liquorice root – may cause neurological issues if a lot is consumed, a small amount of liquorice in a tea or sweet is unlikely to cause this affect unless lots is fed.
High Quantities of Citrus for boys – note: if a boy accidentally ingests a small amount of citrus this is unlikely to cause issues. Instead issues are caused by the build-up of D-limonene in the body, which is mainly found in the pith and skin of citrus fruits (but can be found in small amounts in lots of other fruit and veg). If citrus fruits are fed regularly this is where you see the issue
Mouldy soft cheese – the moulds found in these are often toxic to rats and can cause issues.