Lots of thoughts. This is a very common situation.
If you're much younger than this other developer both professionally and biologically, then just fall in line, to be frank. Do your best. Try to help them out. Always be learning. Eventually maybe they'll move on, or you'll find a better opportunity. But don't under any circumstances badmouth anyone, or try to undermine anyone, or get into an it's-me-or-them situation, these things will only set you back.
I think if you are in the position of asking your manager for permission to refactor or rewrite or whatever, the problem has been framed incorrectly. Managers are for helping people work together, and helping them understand what is important to the rest of the company, and helping the rest of the company understand what you are doing, and helping you understand how to succeed at the company, and... many other things along those lines. They're not for telling you what buttons you're allowed to push on your computer.
Your high level goal should not be to own the code, but rather the problem that the code solves. Then you are in charge of deciding whether to refactor the existing code, or make a fresh start, or something in between. But you have to make the right decision. As a professional, you take responsibility for doing the right thing given the context in which you operate -- the state of the business and the people working around you and of course the existing systems in place. As a professional, you are trustworthy and trusted. You write code when it is appropriate, solving the most important problem at hand in an efficient and maintainable fashion. You account for both short term and long term priorities when making decisions. You communicate thoroughly. You don't make big mistakes, and you own your small mistakes and fix them as soon as possible.
In your career decisions, you should think strategically and follow a path that leads where you want to go. Will this role help you become a mature professional? Do you have mentors to learn from? Will you have a balance of maintenance and greenfield development? Do you see people working there who have healthy levels of autonomy/mastery/purpose?
So overall, just keep your chin up and do your best.
But damn how do they not have tests.