The origin of this report
The commonly known and most acceptable reports of this narrative don't mention the names of the involved Sahabah.
All these reports are derived from the report of the historian ibn Ishaaq, so all the chains go via:
Muhammad Ibn Ishaaq مُحَمَّدِ بْنِ إِسْحَاقَ
-> Sadaqah ibn Yasar صَدَقَةُ بْنُ يَسَارٍ
->'Aqeel ibn Jabir عَقِيلِ بْنِ جَابِرٍ
-> Jabir ibn 'Abdullah جَابِرٍ
This chain has two issues the first is 'Aqeel who is not of a high level of trust as scholars such as ibn Hathim, a-Dhahabi regard him as unknown and ibn Hajar regards him as acceptable.
Further like many historians ibn Ishaaq is not regarded as a hadith reporter of high level of trust, however the two scholars mainly rejcting him are Malik ibn Anas who seemingly had lots of disagreements with him and ibn Hajar who followed Malik's impression, as Malik was a contemporary scholar who should know ibn Ishaaq best.
Here's the hadith version -which was qualified by al-Albani as hassan- in Sunan abi Dawod:
We proceeded in the company of the Messenger of Allah (ﷺ) for the battle of Dhat ar-Riqa. One of the Muslims killed the wife of one of the unbelievers. He (the husband of the woman killed) took an oath saying: I shall not rest until I kill one of the companions of Muhammad.
He went out following the footsteps of the Prophet (ﷺ). The Prophet (ﷺ) encamped at a certain place. He said: Who will keep a watch on us? A person from the Muhajirun (Emigrants) and another from the Ansar (Helpers) responded. He said: Go to the mouth of the mountain-pass. When they went to the mouth of the mountain-pass the man from the Muhajirun lay down while the man from the Ansar stood praying.
The man (enemy) came to them. When he saw the person he realised that he was the watchman of the Muslims. He shot him with an arrow and hit the target. But he (took the arrow out and) threw it away. He (the enemy) then shot three arrows. Then he (the Muslim) bowed and prostrated and awoke his companion. When he (the enemy) perceived that they (the Muslims) had become aware of his presence, he ran away.
When the man from the Muhajirun saw the (man from the Ansar) bleeding, he asked him: Glory be to Allah! Why did you not wake me up the first time when he shot at you.
He replied: I was busy reciting a chapter of the Qur'an. I did not like to leave it.
This hadith goes through the chain:
أَبُو تَوْبَةَ الرَّبِيعُ بْنُ نَافِعٍ Abu Thawba ibn Nafi' ->
'Abdullah ibnn al-Mubarak ابْنُ الْمُبَارَكِ (allmost all the chains go through him) -> Muhammad ibn Ishaaq مُحَمَّدِ بْنِ إِسْحَاقَ (any deviation starts from his narrators) -> Sadaqah ibn Yasar صَدَقَةُ بْنُ يَسَارٍ -> 'Aqeel ibn Jabir عَقِيلِ بْنِ جَابِرٍ -> Jabir ibn 'Abdullah جَابِرٍ
Occurrence in other hadith sources
The hadith was also mentioned by imam al-Hakim (from Nishapur)in his al-Mustadrak under the heading:
عدم انتقاض الصلاة من سيلان الدم
The prayer doesn't break because of the flow of blood.
It was further compiled by a-Daraqotni in his Sunan with a similar heading -see here-.
Imam Ahmad also compiled it in his al-Musnad -see here and a bit different version here-.
Ibn Khuzaimah compiled it in his sahih see here (ibn Khuzaimah named the heading: Chapter: Mentioning the narrative that indicates that the blood coming out of a non-judgmental outlet does not necessitate ablution).
Ibn Hebban in his sahih -see here- however he mentioned it in the introduction on things that invalidate wudu'. It is important to mention that ibn Hebban is among the few people who accepted the narrative of 'Aqeel ibn Jabir and mentioned him in his book a-Thiqaat others regarded him as da'if and even unknown as stated above.
See also: Is there a scale or classification for scholars and their qualification of hadith narrators?
Imam al-Bayhaqi certainly copied some versions from his teacher abu 'Abdillah al-Hakim and mentioned it in several books among them:
A version here hadith #40 in his as-Sunan as-Saghir.
And in his as-Sunan al-Kubra, when mentioning guards of the prophet () a short version -see here-, in the chapter about leaving wudu' due to the flow of blood -see here and as an indication here-.
So based on the fact that many people reported this incident from ibn Ishaaq and the fact that at least on author of the sunnan (abu Dawod) compiled this hadith of 'Aqeel ibn Jabir this hadith might have been regarded as hassan by al-Alabani for the huge amount of similar reports not based on an objective analysis.
Who identfied these people as 'Abaad ibn Bishr and Yasir ibn 'Ammar?
Imam al-Bayhaqi however quoted from al-Waqidi about these two men in his a- Dalaa'il (Dalaa'il an-Nubuwah دلائل النبوة) the following quotes (see here):
، فقال: من رجل يكلؤنا الليلة فقام رجلان عمار بن ياسر وعباد بن بشر فقالا: نحن يا رسول الله نكلؤك
He said: Who will keep watch on us tonight? Then two men, Ammar bin Yasir and Abbad bin Bishr, got up and said: We, O Messenger of God, we will watch over you.
This was by reported al-Bayhaqi via the root:
Abu 'Abdillah al-Hafidh (I'd assume it is al-Hakim) -> abu 'Abdillah al-Asbahani -> al-Hassan ibn al-Jahm -> al_Hussain ibn al-Faraj -> al-Waqidi -> 'Abdullah ibn 'Umar -> 'Ubayd Allah ibn 'Umar -> al-Qassim ibn Muhammad -> Salih ibn Khawat -> Khawat ibn Jubayr خوات بن جبير بن النعمان
This report was about the prayer of fear during the Expedition of Dhat al-Riqa' and the story is about the guardians for the night.
Further al-Bayhaqi stated (See here in the next page):
ويقال الأنصاري: عمارة بن حزم
It was said the man from al-Ansar: 'Umarah ibn Hazm.
قال الواقدي: وأثبتها عندنا عباد بن بشر
Al-Waqidi said: The most proven by us, Abbad bin Bishr.
After completing the report of al-Waqidi, al-Bahyaqi again shortly mentioned the report via ibn Ishaaq.