Yes that can work, however if one of the NGINX servers goes down, then the DNS wiil still send requests to the node that is down, and half of the requests will still not work.
The better solution (and what we are using) is to use Keepalived on the NGINX servers to have a VIP that is shared between the two servers. If the server that currently owns the VIP goes down, then the other server will assume the IP and continue working.