All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
First of all, you should know that this story is not called a hadeeth but it is called an Athar (a report). The difference between a hadeeth and an Athar is that the hadeeth is the saying or action or tacit approval or manner that is attributed to the Prophet whereas an Athar is more general; it may refer to what is attributed to the Prophet and it may also refer to the actions or sayings that are attributed to the Companions and the Taabi‘een (generation that followed the companions).
The story of Khaalid with those hairs is not a hadeeth from the Prophet ; rather, it is an Athar.
We have not come across the chain of narrators of this story. Ibn Katheer cited it in his book Al-Bidaayah wa An-Nihaayah without mentioning its chain of narrators, and he reported it in a manner that indicates that it is weak, as he said, “It was narrated that Khaalid ibn Al-Waleed's helmet once fell off (his head) during the Battle of Yarmook, so he urged the people to help him find it, and he was later blamed for this, so he said: ‘It has some of the hair from the front part of the head of the Prophet and every time I went to battle with it, Allah gave me victory.’”
The only person who reported this story was Muhammad ibn ‘Umar Al-Waaqidi, and the scholars considered him a very weak narrator, to the extent that Imaam Ahmad and others considered him a liar. Al-Waaqidi reported it in his book Futooh Ash-Shaam, as he said:
“The helmet of Khaalid ibn Al-Waleed fell off his head, so he shouted, ‘My helmet! May Allah have mercy upon you (people)!’ A man from his people who was from the Banu Makhzoom tribe picked it up and handed it to him, so Khaalid took it and wore it. Then afterwards it was said to him, ‘You were in such a condition in battle, and you insisted on finding your helmet!’ Khaalid said, ‘When the Prophet shaved his head in the Farewell Hajj, I took some of his hairs, and he asked me, 'What are you going to do with those, O Khaalid?' I replied, 'I will seek blessings from them, O Messenger of Allah, and I will seek their help in fighting my enemies,' so the Prophet said to me, 'You will be victorious as long as they are with you,' so I kept them in the front of my helmet. I never confronted an enemy except that they were defeated with the blessings of the Messenger of Allah .’ Then he fastened them with a red band… ”
Seeking blessing from the traces of the Prophet is permissible, and it is proven in many hadeeth that the Companions sought blessings from his traces.
For instance, Abu Juhayfah, may Allah be pleased with him, narrated: “The Prophet came to us at noon, and water for ablution was brought to him. After he had performed ablution, the remaining water was taken by the people and they started wiping it over their bodies. The Prophet then offered two Rak‘ahs (units of prayer) for the Thuhr prayer and then two Rak‘ahs for the ‘Asr prayer (as he was traveling).”
Abu Moosa said, “The Prophet asked for a container with water, so he washed his hands and face and then spat in it and said to them (Abu Moosa and Bilaal), ‘Drink from it, and splash water from it on your faces and your necks.’” [Al-Bukhaari]
Sahl ibn Sa‘d, may Allah be pleased with him, narrated that he heard the Prophet on the day of (the battle of) Khaybar say, “I will give the flag to a person at whose hands Allah will grant victory.” So the Companions got up, wishing eagerly to see to whom the flag would be given, and every one of them wished to be given the flag. But the Prophet asked for ‘Ali. Someone informed him that he was suffering from eye-trouble. So he ordered them to bring ‘Ali in front of him. Then the Prophet spat in his eyes, and his eyes were cured immediately, as if he had never had any eye-trouble.” [Al-Bukhaari and Muslim]
Jaabir, may Allah be pleased with him, narrated:
“When the Trench was dug, I saw the Prophet in the state of severe hunger. So I returned to my wife and said, ‘Have you got anything (to eat)?’ [And they had very little food]… Then the Prophet raised his voice and said, ‘O people of the Trench! Jaabir has prepared a meal, so let us go.’ The Prophet said to me, ‘Do not put down your meat pot (from the fireplace) or bake your dough till I come.’ So I went (to my house), and Allah's Messenger too, came, proceeding before the people. Then I brought the dough out to him, and he spat in it and invoked for Allah's blessings in it. Then he went towards our meat-pot and spat in it and invoked for Allah's Blessings in it. Then he said (to my wife), ‘Call a lady-baker to bake along with you, and keep on taking out scoops from your pot, and do not put it down from its fireplace.’ They were one thousand men (who took their meals), and I swear by Allah, they all ate until they left the food and went away, and our pot was still bubbling (full of meat) as if it had not decreased, and our dough was still being baked as if nothing had been taken from it.” [Al-Bukhaari and Muslim]
In the story of Al-Hudaybiyah, Al-Miswar ibn Makhramah and Marwaan ibn Al-Hakam narrated:
“…‘Urwah then started looking at the Companions of the Prophet and said, ‘By Allah, whenever Allah's Messenger spat, the spittle would fall in the hand of one of them (i.e. the Prophet's Companions), who would rub it on his face and skin; if he ordered them, they would carry out his orders immediately; if he performed ablution, they would struggle to take the remaining water; and when they spoke to him, they would lower their voices and would not look at his face constantly, out of respect. ‘Urwah returned to his people and said, ‘O people! By Allah, I have been in the presence of kings and Caesar, Khosrau, and An-Najaashi (Negus, King of Abyssinia), yet I have never seen any of them respected by his courtiers as much as Muhammad is respected by his Companions…” [Al-Bukhaari]
Anas ibn Maalik, may Allah be pleased with him, narrated, “The Prophet once came to our house and took a nap, and he was sweating (in his sleep). My mother brought a little bottle and began to collect the sweat in it. The Prophet woke up and said, ‘O Umm Sulaym, what is this that you are doing?’ Thereupon, she said, ‘This is your sweat, which we mix in our perfume, and it becomes the most fragrant perfume.’” [Muslim]
Seeking blessing with these traces is peculiar to the Prophet and it is not permissible to seek blessings in the person or traces of any righteous people other than him.
Allah knows best.