فطرت اور سیدنا ابراہیمؑ کے خوابِ ذبح سے متعلق ایک اشکال
Its difficult to say as Quran is silent about it. Best we can do inconclusive conjucture. The messages from God started with true dreams for prophet Mohammad saw. https://sunnah.com/bukhari:3 assuming biblical narrative to be true, God was in communication with him before this incident. So based on his previous experience he may knew that it was dream from God.