water can only come in 2 ways
either a) through the inlet solenoid
and b) through the drain hose
if its A then yes inlet valve needs replacing as its acting like a dripping tap
if its B then every time you use your sink a little bit of dirty water goes into the dishwasher. if this is the case its just a matter of re routing the pipes draining the dishwasher so they come in higher to stop the water flowing back
try turning off the tap to the dishwasher and see if it stops filling
Dave