As far as I know, it is. You may see some UI breakage with extra long usernames that Discourse does not expect, though. The site setting is
max username length
and defaults to 20.
I haven’t checked the database schema to see what the absolute limit on username length as stored in the database is, though.