the difference was much evident between the divine revelation (wahi) and the prophet's instructions (hadith). there are authentic reports of prophet PBUH clearly stating that it's a revelation before reciting it to the companions (sahabah) and there are other reports that those around him clearly witnessed the revelation sent down to him. let us look at the evidences, insha Allah.
in sahih bukhari in the chapter : How the Divine Revelation started being revealed to Allah's Messenger
Narrated 'Aisha:(the mother of the faithful believers) Al-Harith bin Hisham asked Allah's Messenger (ﷺ) "O Allah's Messenger (ﷺ)! How is the Divine Inspiration revealed to you?" Allah's Messenger (ﷺ) replied, "Sometimes it is (revealed) like the ringing of a bell, this form of Inspiration is the hardest of all and then this state passes off after I have grasped what is inspired. Sometimes the Angel comes in the form of a man and talks to me and I grasp whatever he says." 'Aisha added: Verily I saw the Prophet (ﷺ) being inspired divinely on a very cold day and noticed the sweat dropping from his forehead (as the Inspiration was over).
from this we can understand that sometimes the divine revelations were very evident and can be witnessed by others. there are other times that the prophet PBUH himself specifically mentioned that a revelation has come,
Anas reported : One day the Messenger of Allah (ﷺ) was sitting amongst us that he dozed off. He then raised his head smilingly. We said: What makes you smile. Messenger of Allah? He said: A Sura has just been revealed to me, and then recited: In the name of Allah, the Compassionate, the Merciful. Verily We have given thee Kauthar (fount of abundance). [sahih muslim] (similar narration in nasai and abu dawud)
if we look into the great works of tafsir of the quran we can see numerous incidents like this. each and every single time a verse or a surah was revealved, the sahabah around the prophet PBUH knew. ill mention a few evidences;
Narrated Abdullah : While we were in the company of the Prophet (ﷺ) in a cave at Mina, when Surat-wal-Mursalat were revealed and he recited it and I heard it (directly) from his mouth as soon as he recited its revelation. [sahih bukhari] (similar narration in sahih muslim)
this one is a part of a long hadith and i'll mention only the part relevant to your question. it is regarding the revelation of the verse of slander (24:11). ;
Narrated Aisha : Then I turned to the other side of my bed hoping that Allah would prove my innocence. By Allah I never thought that Allah would reveal Divine Inspiration in my case, as I considered myself too inferior to be talked of in the Holy Qur'an. I had hoped that Allah's Messenger (ﷺ) might have a dream in which Allah would prove my innocence. By Allah, Allah's Apostle had not got up and nobody had left the house before the Divine Inspiration came to Allah's Apostle. So, there overtook him the same state which used to overtake him, (when he used to have, on being inspired divinely). He was sweating so much so that the drops of the sweat were dropping like pearls though it was a (cold) wintry day. When that state of Allah's Messenger (ﷺ) was over, he was smiling and the first word he said, `Aisha! Thank Allah, for Allah has declared your innocence.' [sahih bukhari] (similar narrations in muslim and tirmidhi)
another example can be found in regarding the revelation of the verse 4:95.
Narrated Sahl bin Sa'd As-Sa'idi : I saw Marwan bin Al-Hakam sitting in the Mosque. So I came forward and sat by his side. He told us that Zaid bin Thabit had told him that Allah's Messenger (ﷺ) had dictated to him the Divine Verse: "Not equal are those believers who sit (at home) and those who strive hard and fight in the Cause of Allah with their wealth and lives.' (4.95) Zaid said, "Ibn-Maktum came to the Prophet (ﷺ) while he was dictating to me that very Verse. On that Ibn Um Maktum said, "O Allah's Messenger (ﷺ)! If I had power, I would surely take part in Jihad." He was a blind man. So Allah sent down revelation to His Apostle while his thigh was on mine and it became so heavy for me that I feared that my thigh would be broken. Then that state of the Prophet (ﷺ) was over after Allah revealed "...except those who are disabled (by injury or are blind or lame etc.) (4.95) [sahih bukhari] (similar narrations in nasai and thirmidhi)
through and through out the revelation of the quran in the 23 years we can find so many evidences that support the fact that it was specifically mentioned and the sahabah knew what is quran and what is hadith. as we understand the main difference between quran and hadith is that, quran is the word of Allah azzawajjal and it is recited just the way it was revealed, without even a single word being changed. and that was the way it was recorded during the time of the prophet PBUH. whereas hadith is the spoken word of prophet PBUH himself and very much different from the classical arabic used in the quran and were not recorded during the time of the prophet PBUH and it was passed down via speech till the recording and compiling of hadith started much later.
there are authentic narrations indicating that when a verse or a surah of the quran was revealed, it was written down and this was instructed by the prophet PBUH himself.
Narrated Al-Bara :When the Divine Inspiration: "Those of the believers who sit (at home), was revealed the Prophet (ﷺ) sent for Zaid (bin Thabit) who came with a shoulder-blade and wrote on it. [sahih bukhari]
Zaid R.A was the personal scribe of the prophet PBUH and he used to write the verses of quran as dictated to him by the prophet PBUH. and he was the main authority in compiling the quran during the reigns of Abu bakr R.A as well as Usthman R.A.
in the seerah of the prophet PBUH, there are mentions of numerous scribes who wrote the quranic verses as it was revealed.
Ibn al-Qayyim said : The scholars of seerah (Prophet’s biography) have mentioned the names of the Sahaabah who used to write down the wahy (revelation) or the letters of the Messenger (peace and blessings of Allaah be upon him). They were: Abu Bakr al-Siddeeq, ‘Umar ibn al-Khattaab, ‘Uthmaan ibn ‘Affaan, ‘Ali ibn Abi Taalib, al-Zubayr ibn al-‘Awwaam, ‘Aamir ibn Fuhayrah, ‘Amr ibn al-‘Aas, Ubayy ibn Ka’b, ‘Abd-Allaah ibn al-Arqam, Thaabit ibn Qays ibn Shammaas, Hanzalah ibn al-Rabee’ al-Usaydi, al-Mugheerah ibn Shu’bah, ‘Abd-Allaah ibn Rawaahah, Khaalid ibn al-Waleed, Khaalid ibn Sa’eed ibn al-‘Aas (whom it was said was the first one to write down anything for him), Mu’aawiyah ibn Abi Sufyaan and Zayd ibn Thaabit. He requested them to do that and allocated this task to them. [ Zaad al-Ma’aad, 1/117 ]
And Ibn Hajar said : Al-Qadaa’i said: Zayd ibn Thaabit used to write to the kings on his behalf, as well as writing down the revelation. [Al-Talkhees al-Habeer, 4/346, 347 ]
these are just a few examples, as each and every verse and surah in the glorious are accounted for, there are stories, incidents and events behind every verse. witnesses other than the prophet PBUH himself to the divine revelation.
(note : this answer can be extended as there are so many reports about prophet PBUH specifically stating that a divine revelation has come to him before reciting it and many incidents about the sahabah witnessing it first hand)
may Allah the mighty and sublime grant us mercy and guide us to the straight path.
Allah knows best