As soon as you have marked the Item references in "Inventory Setup" as 'Yes' for the ones you want to prevent duplicated codes, references within "Item Cards" will no longer accept duplicated values.
To show how this works, open up an "Item Card" and in the ribbon, select Related and then Item References.
This will open up a list for you to store references against this Item. The Reference Type can either be 'Customer', 'Vendor' or 'Bar Code' as per the "Inventory Setup" options. Now that you have prevented duplicates (in this example, I am using 'Customer' Reference Type), if I use the below Reference No for 1 "Item Card" but then try and use the same Reference No for the same Customer on another "Item Card", it will error as per below. This is because this Customer can now no longer have duplicated codes across multiple items, all Reference No's for this customer must now be unique.
This process is exactly the same when using Reference Types 'Vendor' and 'Bar Code' and will always error if trying to use the same code for the same 'Vendor' or 'Barcode' across multiple Items.
Preventing duplicated Item References is only applicable where trying to use the same reference for multiple items where either the 'Customer', 'Vendor' or 'Barcode' is the same. This does not stop you from using the same Reference No across multiple 'Customers', 'Vendors' or 'Barcodes' as the image below shows.