It would, and does. I encourage you to try it for yourself. I also encourage you to look at existing modules, such as Set::Object, which generally do a lot more than just union.
I don't know what you're asking, since objects "are" references in perl.
Why don't you try it yourself, on a test you think is meaningful.
Then, if it doesn't work, show us what you did and what you expected to happen that didn't happen.