Sure you can. It’s what cloudflared and services like it are designed for.

Is it still self-hosting though?

You just need to keep the DNS record updated.