Yup, if the current data on the disk is not important to you, you can do an unused space erase before formatting.
However, if you're giving it away, there's usually information you can't account for and you'd want those erase. For that reason, I'd recommend formatting then erasing. However...