Can Trellis be used with LocalWP?

Trellis is designed to provision (setup) a dedicated server so I wouldn’t recommend running it on your local machine. However, you can point Trellis at any kind of Ubuntu machine. Whether that’s a VM in VirtualBox via Vagrant (or another Vagrant provider), a VM using Qemu, or an LXD based container for example.

See LXC/LXD as an alternative to Virtualbox for local development for an example of that.

No guarantees on timing, but trellis-cli is getting local development built-in soon-ish and it will used LXD for Linux/Ubuntu hosts.