As long as your dishwasher does not have a stainless steel interior then you can use bleach in the dishwasher to help clean dishes and clean the dishwasher as well.
Just never mix bleach and vinegar together as it can cause a deadly gas or even damage the dishwasher.
I run some powdered bleach and sometimes liquid bleach through my dishwasher when it needs a good cleaning and it does a good job at cleaning the dishwasher.
I also sometimes use it to disinfect dishes that my dog has ate off of.