This video is a demonstration of how (offhand) can work in Minecraft Bedrock, so it is not an Addon.
Example of how it works:
The player opens their inventory and places the desired item in the off-hand slot. When this is done, a new button appears on the screen. Tapping this button activates the off-hand, allowing the player to use the item. Tapping it again deactivates the off-hand and returns control to the main hand.