It seems generally agreed that the word "ant" comes from Old English ǣmete. Your second source about the history of the word "ant" says that this word also took the form "ampte" in Middle English, but later changed further to "ant."
As Gareth Rees explains in his answer, the change of m to n was motivated by the process of assimilation. It's common for nasal consonants such as /m/ to assimilate to following stop consonants such as /t/. In fact, the same change happened in the history of the word aunt, which comes from Latin amita via Old French ante.
Even though the assimilation /mt/ > /nt/ does not usually occur in modern English, there are some comparable assimilatory processes. The consonant /n/ is commonly assimilated to /ŋ/ before velar stops, or to /m/ before bilabial stops. And according to the following paper, even /m/ and /ŋ/ are occasionally assimilated in some cases in modern English speech: "Assimilation of word-final nasals to following word-initial place of articulation
in UK English".
Is the change of Old English m(..)t to Modern English nt regular?
I actually don't know if the assimilation of /m/ to /n/ in ant (from Old English ǣmete) should be classified as regular or irregular. On the one hand, the Oxford English Dictionary helpfully references another word with this sound change: scant, which apparently comes from Old Norse skamt.
But on the other hand, there are a couple of counterexamples where /m/ was retained before /t/ (with epenthetic "p" between them in the modern spelling, and optionally in the pronunciation). First, the word empty, which descends from Old English ǣmtig, ǣmetig. Second, the place name Hampton, which corresponds to Old English Hāmtūn.
Unfortunately, I haven't been able to find any other examples, as this sequence of sounds was not very common in Old English. So, I can't provide a firm conclusion.
One word that shows a similar assimilation is lenten, Lent, which the Oxford English Dictionary says comes from Old English lęncten (which presumably would have been pronounced with the velar nasal [ŋ]).
Similar developments at other times
There are a few similar words that developed clusters like these more recently in English. For example, Peter Shor mentions the contraction ain't, derived from am + not. Of course, not already starts with /n/, so this word isn't entirely comparable to ant. On the other hand, the words "dreamt" and "unkempt" have /m(p)t/ from contracted m followed by t.
There are also words that underwent this kind of change before entering English, such as the aforementioned aunt, the verb count (from Old French cunter, conter, which developed from earlier Latin computare) and the noun prince, which comes (through French) from the Latin word princeps, which already showed assimilation in Classical times (it is composed of the roots prim- as in primus "first, prime" and ceps from the verb capere "to take").