Nafi' narrates that whenever Abdullah bin Umar (may Allah be pleased with them both) had a nosebleed during the prayer, he would leave, perform ablution and come back, then continue from where he had prayed up to, and he would not speak in the meantime. Something similar is also narrated from Ali (may Allah be pleased with him).
This report from Ibn Umar is sahih (authentic).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3384