Setting that option will prevent unprivileged users access to cloning a user namespace.
This will not prevent LXD from running as it runs as root, but it also won’t prevent someone inside a container from attempting to exploit this flaw.
Updating your kernel is, as usual, the best option there. There may be more ways to prevent this attack if a reboot isn’t an option, but I’d need to know a lot more about the actual bug to see alternative ways to block it (seccomp/apparmor). This may also be something that livepatching could fix (not sure if this was picked up for that or not though).