Here are the key lines of Ezekiel 29:3 in Hebrew:
הִנְנִי עָלֶיךָ פַּרְעֹה מֶלֶךְ־מִצְרַיִם
hinĕnî ʿāleykā parʿōh melek-miṣrayim
(Behold I am against you, Pharaoh, king of Egypt,)
הַגָּדוֹל הָרֹבֵץ בְּתוֹךְ יְאֹרָיו
hattannîm haggadōl hārōbēṣ bĕtôk yĕʾōra(y)w
(the great dragon who lies in the midst of his rivers...)
Textual note : the Masoretic Text has hattannîm (hat + tannim) here, the plural of "jackals", universally recognized (see, e.g., Rashi on this verse) to be in error (or a bi-form) for hattannîn, the singular for "sea serpent" or the like. The same mistake is found in Ezekiel 32:2. The rest of this answer will be about tannîn.
The Hebrew tannîn is used of some kind of serpent, but typically one found in the water, so a "sea monster" or the like. Here is the entry for the Brown-Driver-Briggs lexicon:
It's used about 14×,1 rarely of simply a "serpent" (e.g. Deuteronomy 32:33), but it's more typical "habitat" is in the water, as in the beginning in Genesis 1:21. In Ezek 29:3, it is translated in the Septuagint by τὸν δράκοντα (ton drakonta), from the word from which we get our word "dragon".
In several of these references (see entry # 3 in BDB), these are associated with a cosmic power, hostile to YHWH. Given the association of Pharaoh, king of Egypt, with the Nile, the resonance was strong enough to link this "sea monster" with Pharaoh (see especially as "crocodile", in a more natural sense). It is, then, simply an evocative "mythical metaphor" associated the king of Egypt with this mythical creature.
These connections are teased out in a nice study by D.A. Diewert, "Job 7:12: Yām, Tannîn and the Surveillance of Job", Journal of Biblical Literature, 106/2 (1987): 203-215, which focuses on a particular issue in Job, but attends to the wider background of tannîn as well. See also G.C. Heider's "Tannin" article in Dictionary of Deities and Demons in the Bible, ed. by K. van der Toorn et al (2nd edn; Brill, 1999), pp. 834-36.
- Gen. 1:21; Exod. 7:9, 10, 12; Deut. 32:33; Job 7:12; Ps. 74:13; 91:13; 148:7; Isa. 27:1; 51:9; Jer. 51:34; Ezek. 29:3; 32:2.