Right click on the object to select it and make the pie menu appear, then press CTRL ALT SHIFT T ("T" like Textures, since it is the main function of this feature) to get the object info (including its UUID).
You may also derender objects with the pie menu and use the Lua function GetDerenderedObjects() to get the list of currently derendered objects.
Be aware that avatar attachments will have their UUID changed each time they get rezzed; same with temp-on-rez objects...