Only a dog walking over intact skin is not a rabies exposure. Rabies needs saliva or a bite/scratch on broken skin or mucosa. A hangnail is broken skin, so if his paw or your hand carried fresh saliva there, I treat it as Category II and vaccinate. Touching your own mouth with a hand that had no visible saliva is not risk. Wash the hangnail well with soap and water. If in doubt about saliva contact, start anti-rabies vaccine within 24-48 hours - it is harmless and settles the question.
Next Steps
Wash the hangnail with soap and running water for 15 minutes. If there was any chance of saliva on it, take the anti-rabies vaccine schedule (day 0, 3, 7, 28). Consult me on Practo or at Synergy Multispeciality Hospital, Miraj if you want the exposure category assessed properly.