Can snapshots be used when upgrading the host OS?

A DO snapshot includes the OS version. Restoring a snapshot would roll back the operating system.

Your practical options are to move a backup, or rsync /var/discourse and manually reinstall docker.