I have come across many people who say dogs are impure or that I have to wash myself if a dog touches me or if I touch a dog.
Is there any evidence for this belief?
Evidence: Quran and authentically proven sayings of the Prophet.
Yes they are, because of that the Prophet ordered us to clean a vessel which has been licked by a dog, seven times the first with soil.
Muslim (279) narrated that Abu Hurayrah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “The purification of the vessel of one of you, if a dog licks it, is to wash it seven times, the first time with soil.”
This saying has no basis neither in Quran nor Sunna. It might be an overdraw interpretation of ahadith which prohibit eating their meat (Sahih Muslim 1 2 which considers them as part of as-siba-a السِّبَاعِ or as a conclusion from this hadith in sahih al-Bukhari and this from sahih Muslim as it's forbidden to sell them they shouldn't be eaten) or about purification if the spittle of a dog touches something! So only their spittle is impure! But even this hadith is questionable Imam Malik said about it "The hadith came and I don't know his reality" as it clearly contradicts to the fact that the spittle of hunting animals are pure. Imam Malik, al_Awza'i and others therefore considered the cleaning of the vessels as a ritual matter while others (like the Hanafis, Shafi'is and Hanbalis) considered it as a cleaning due to najassa. Note that -assuming the dogs are najis- other siba-a are not considered as najis by this hadith (which appears in the four sunan). So are dogs an excpetion?
Dogs are pure or else how come Qur'an (5:4) on the other hand clearly allows using them for hunting?
They ask you, [O Muhammad], what has been made lawful for them. Say, "Lawful for you are [all] good foods and [game caught by] what you have trained of hunting animals which you train as Allah has taught you. So eat of what they catch for you, and mention the name of Allah upon it, and fear Allah ." Indeed, Allah is swift in account.
or in the clearer translation of Pickthall:
They ask thee (O Muhammad) what is made lawful for them. Say: (all) good things are made lawful for you. And those beasts and birds of prey which ye have trained as hounds are trained, ye teach them that which Allah taught you; so eat of that which they catch for you and mention Allah's name upon it, and observe your duty to Allah. Lo! Allah is swift to take account.
And dogs and bird of preys were known and used for hunting at the time!
In addition to that you'll find in both Sahihs this hadith which confirm this interpretation and teaches us how they should be used for hunting!
Here are two fatwas in Arabic one about eating the meat of the dog, and one about purity of spittle of a hunting dog, where you will find that the scholar only considered the spittle of the dog as impure!
And Allah knows best!