no, dont youll ruin it, it has components that will rust, and/or be washed off with that much pressure, maybe a keyboard, because it is enclosed, but not a mobo, that would destroy it
Why wash it in the first place? If it's only because its dusty, compressed air and vacuum is the way to go. If it's "dishwasher" ready, it means there's some other liquid/goo/hard to remove stuff, so its util life is over. I think.
Are you sure the teacher is not your home economics or cooking teacher. Dishwasher ouch, why don't you just put the entire computer in there, or give it a bath.