I think we could stand to quote this passage with a little more context, and with consistent terminology:
Ecc 3:16 Then again I saw under the sun: In the place of right-ruling, wrongness was there. And in the place of righteousness, wrongness was there.
Ecc 3:17 I said in my heart, “Elohim judges the righteous and the wrong, for there is a time for every matter and for every work.”
Ecc 3:18 I said in my heart, “Concerning the matter of the sons of Adam, Elohim selects them, so as to see that they themselves are behemah.”
Ecc 3:19 For the event of the sons of Adam is also the event of behemah – one event befalls them: as one dies, so dies the other. Indeed, they all have one ruach– Adam has no advantage over behemah. For all is futile.
Ecc 3:20 All are going to one place – all came from the dust, and all return to dust.
Ecc 3:21 Who knows the ruach of the sons of Adam, which goes upward, and the ruach of behemah, which goes down to the earth?