And if so how did they rationalize the different gods to themselves? Did they assume the other was wrong and that they were in fact the ones with the real gods? Or did they have some sort of concept that their gods were in some sense the same but they had different ways of recognizing them?
Can you define "ancient" and "Greek"?
The short answer though is yes, Egypt was ruled by the Greek Ptolemaic dynasty for 250+ years, so yeah it would have been hard not to notice eachothers pantheons.
There are records and artifacts that indicate very solidly trade going back 1500 years prior between Egypt and Crete, although I know very little about the religious practices of Minoans at that time, there would certainly have been some Egyptians with a passing knowledge of this, and probably vice versa. There is good reason to believe there was also trade between Egypt and the Greek mainland, but I am far from certain the relationship was close enough for significant cultural exchange.
There wasn't much religious conflict in this time period, people probably would have thought that "these are our gods, and those are their gods" or something like that. During the Roman period people tended to believe that the gods of various cultures were just different names for the same gods, rather than each culture having its own group of distinct gods.
They very much were aware, and spent three centuries intertwined, with the Ptolemaic Pharaohs. So yes there was this idea that the gods were, as you say, in 'some sense the same', as Amon was for the Egyptians the most important god, and Zeus was for the Greeks, so the solution was syncretism, like having Amon-Zeus, and in having a new divinity, Serapis, with a Greek form.
And the idea of gods 'merging' was something entirely familiar to the Egyptians, who already had divinities with multiple identities, like Amon-Re etc.