Ansible let's you elevate to sudo when SSHing in as a non-root account. You can do this for on a play-by-play basis or for all plays.
If you feel manually filling in the sudo password every time is cumbersome, you could also integrate it with a yubikey or make it fetch your sudo password automatically via e.g. GNU pass.