Should I throw a strangers dog in a dumpster?
That would be awful. Why would ever make you want to throw a stranger's dog into a dumpster?
Dogs are really disgusting animals and I just want to get rid of it.
There's nothing that would make it okay for you to do this, even if you dislike dogs you have to realize that causing harm to an animal is something considered extremely sick and disgusting. Not only that, but this type of cruel prank would hurt the other person and make you look bad to everyone who finds out. It would be better if you just ignore the dog instead and go about your day as you typically would.
What if I do it for a prank? Would it be okay then?
No a prank will not make it okay. In fact it would be cruel as a prank and you should never do cruel pranks on other people. They are not funny and come across as bullying.