Java Edition
Any item can be held and used when applicable.
Edition comparison
Java allows most items in the offhand.
Java vs Bedrock: OffhandAny item can be held and used when applicable.
The offhand slot has narrower use, principally shields, maps and selected items.
Choose a design, command or workflow explicitly tested for your edition; offhand behaviour is not always portable.