I keep forgetting that the Atari 2600, the NES, the Apple II and the C64 had the same processor. But... didn't the C64 have a modem? So it should be able to connect to the Internet, even if very slowly?
I never had a IP stack for it, but I did use my Commodore machines to dial into a shell account and use the internet available at the time (telent and ftp), and to MUD. I believe the terminal program I used had full ANSI support.
That being said, I had quite the software library.
https://wphosting.tv/how-to-use-the-commodore-c128-in-2mhz-f...