Can I install a new dishwasher or are there code changes
In general you do not have to upgrade when replacing an installed appliance, but I cannot speak for your state or municipality. In my state there is no need for even a permit as long as it is a replacement or repair. Unless there is a code violation or you simply want to upgrade for a more safe installation. 

When I say code violation that would be the effective code that was in place during its installation. The famous "Grandfather clause". 

Good luck