You can get LXD to assign an IP address to a container as long as LXD is managing the specific network.
However, it you want to set a public IP address to a container, then LXD is not managing that network, and you have to set that address manually.
Have a look at https://blog.simos.info/configuring-public-ip-addresses-on-cloud-servers-for-lxd-containers/
on how to do that. There are a few more steps to automate the process described there, but the instructions should be able to get you going.
You may find helpful the rest of the set at The LXD tutorials of Simos