Also I don't want to dockerize the whole thing with older version of
mariadb.
Good. Using old versions indefinitely is more work than most people realize. Security updates will end, you would need to find an alternative like buy support from someone who can backport fixes. Which is a hard to find skill. And then you are stuck on and old version and don't get new features.
Is there a way to use new mariadb but also use older syntax/function
set so there is no collision?
No, row_number is a window function that exists in all supported versions of MariaDB. Unfortunate that you picked the name first, but row_number is a convention among SQL implementations.
Quoting is one syntax to resolve the ambiguity, as you said. This would be a relatively minor refactoring project, no behavior change and no need to touch data or schema. If the developers of your site will not do it, what other more complex maintenance is the code not getting?