A ghost can possess people (‘humanoids’). It can also go onto the Border Etherial, phasing between two planes of existence. This means its interaction with physical objects varies based on where it has gone plane-wise and who it is ‘inside’, person-wise.
Attunement requires a very specific process:
Attuning to an item requires a creature to spend a Short Rest focused on only that item while being in physical contact with it (this can’t be the same short rest used to learn the item’s properties). This focus can take the form of weapon practice (for a weapon), meditation (for a wondrous item), or some other appropriate activity. If the Short Rest is interrupted, the attunement attempt fails. Otherwise, at the end of the Short Rest, the creature gains an intuitive understanding of how to activate any magical properties of the item, including any necessary Command words.
It is not clear who is touching things while one is doing Possession. The ghost is using the person ‘as a puppet’. By holding a magic knife with a puppet one is NOT touching the knife at all. Yet, if arrested, pointing out ‘the magic knife is attuned to the puppet!!’ does not help much. After all possession is 9/10ths of the law.
Question repeat: Can a ghost attune to a magic item? If so, under what conditions?