You should use the outfit manager to equip the outfit.
Outfit_Manager:EquipOutfit(actorCategory, outfitIndex)
As Outfit_Manager is the class you need to use the object for it:
ZO_OUTFIT_MANAGER
So ZO_OUTFIT_MANAGER:Outfit_Manager:EquipOutfit(actorCategory, outfitIndex)
See file esoui/ingame/outfits/outfit_manager.lua
The function EquipOutfit needs the same 2 parameters btw, not only an index! 1st param is actorCategory
EquipOutfit(actorCategory, outfitIndex)
Every function where a companion could be involved needs this actorCategory now!
actorCategory is of this type:
GAMEPLAY_ACTOR_CATEGORY_COMPANION = 1
GAMEPLAY_ACTOR_CATEGORY_PLAYER = 0
Edit:
You need to check the API documentation of the MOST CURRENT ApiVersion (see here for the live server, or use the PTS version for the PTS
https://wiki.esoui.com/APIVersion#live_API_version
and then check the linked ApiDocumentation .txt file) and not anything you find which maybe outdated of older APIversions!
The ESOUI Wiki is not updated in total. Always check at the top of the main page (functions, events, constants, etc.) which APIversion it was updated with last and compare it to the current live version.