Wasn't it to the "brook of Egypt"? Why, yes. The brook of Egypt wasn't the Nile, and in fact, it wasn't even a river. It was a wadi, not always flowing with water, going through dry and wet seasons:
"(nachal = "a flowing stream," "a valley"; best translated by the oriental word wady, which means, as the Hebrew word does, both a stream and its valley).
"The Brook of Egypt was not an Egyptian stream at all, but a little desert stream near the borderland of Egypt a wady of the desert, and, perhaps, the dividing line between Canaan and Egypt. It is usually identified with the Wady el 'Arish of modern geography.
"The Brook of Egypt comes down from the plateau et Tih in the Sinai peninsula and falls into the Mediterranean Sea at latitude 31 5 North, longitude 33 42 East. Its source is at the foot of the central mountain group of the peninsula. The upper portion of the wady is some 400 ft. above the sea. Its course, with one sharp bend to the West in the upper part, runs nearly due North along the western slope of the plateau. Its whole course of 140 miles lies through the desert. These streams in the Sinai peninsula are usually dry water-courses, which at times become raging rivers, but are very seldom babbling "brooks." The floods are apt to come with little or no warning when cloudbursts occur in the mountain region drained."
https://bibleatlas.org/brook_of_egypt.htm
As for the Euphrates, it wasn't the entire Euphrates, but only a portion towards the north east of Israel.