See Derekh HaShem here paragraph beginning with "והנה". A partial quotation:
כי אין נפש הבעלי חיים אלא דבר גשמי, מן הדקים שבגשמיות ― Although animals may have a soul, it is not a spiritual entity, it is the most fine of physical entities.
His sources include your possuk Koheles 3(21) *ורוח הבהמה *הירדת היא למטה לארץ. (see the Feldheim edition translated by Aryeh Kaplan for the sources.)
Here is the Chabad translation of our possuk with the translation of Rashi's commentary:
Who knows that the spirit of the children of men is that which ascends
on high and the spirit of the beast is that which descends below to
Who knows: Like (Joel 2: 14): “Whoever knows shall repent.”
Who is it who understands and puts his heart to [the fact] that the
spirit of the children of men ascends above and stands in judgment,
and the spirit of the beast descends below to the earth, and does not
have to give an accounting. Therefore, one must not behave like a
beast, which does not care about its deeds.