Is it ok to run the garbage disposal when the dishwasher is running?

Yes. Your dishwasher discharge hose is probably hooked into the side of the disposal. Running your disposal will not hurt the dishwasher.