You can use Two-Handed weapons, including the Two-Hand trait, with HotA
You are able to wield your staff (or another weapon) in two hands while you cast Hand of the Apprentice.
- Somatic requires that your hands are not bound.
You can use this component while holding something in your hand, but not if you are restrained or otherwise unable to gesture freely.
- 'Wielding' a weapon is just holding it at the ready
You're wielding an item any time you're holding it in the number of hands needed to use it effectively.
You are able to provide Somatic components while your hands are full, even if what their full of happens to be a wielded weapon.
My first impression was still going to be that the answer is "No, for staves, but you can use actual two-handed weapons" because HotA does not apply most Traits (more on that in a moment) but a careful readying of the Two-Hand trait
This weapon can be wielded with two hands. Doing so changes its weapon damage die to the indicated value. This change applies to all the weapon’s damage dice, such as those from striking runes.
shows that it is a passive benefit as long as you have the weapon in two-hands (as opposed to benefits such as agile and forceful which apply to Strikes made with the weapon). Other Traits are not applied by Hand of the Apprentice because you only
deal the weapon's damage as if you had hit with a melee Strike
and are not "making a Strike" with said weapon. However, the damage di(c)e have already been changed, so the spell will deal that amount of damage.
A small note: (that you seem to be aware of, but to make sure the answer is complete) this does require that you are wielding the weapon two-handed if it has the Two-Hand trait which takes an Interact Action if you were only holding/wielding it one-handed.
The weapon being out of your hands isn't relevant
The fact that the weapon is not "in your hands" because of the spell is irrelevant because the specifics of the spell ("you deal the weapon's damage as if you had hit with a melee Strike") supersede the normal rules about wielding a weapon. Arguably, the weapon will return to only one of your hands (I'd allow both, as a GM), but the spell does not care that the weapon isn't in your hands when the damage is dealt.
"But using it with a two-handed weapon might be imbalanced?!" Unlikely, if you look at available 1st and 2nd level spells that don't require your focus point and continue to scale beyond 4 dice (by the time you have level 19 equipment, no less). It seems almost likely that it was intended to be used with a two-handed weapon to maintain any form of relevance.
Thanks to @YopiLopi whom pointed out that Ezren's official pre-gen sheet includes language about using his Hand of the Apprentice
you deal the staff’s damage as if you had hit with a melee Strike (you can deal the staff’s two-hand damage)