you can trace "ax" back to the eighth century. The pronunciation derives from the Old English verb "acsian."
Chaucer used "ax." It's in the first complete English translation of the Bible (the Coverdale Bible): " 'Axe and it shall be given.'
Why Chaucer Said 'Ax' Instead Of 'Ask,' And Why Some Still Do : Code Switch : NPR