Hi José,
Sorry for the delay. No, it is not a requirement to include year as a covariate in the model in order to estimate a trend. There are numerous ways that a trend can be derived from any sort of analysis (e.g., the average annual difference between occupancy probabilities, difference between occupancy probability in the first year and last year, or as some other derived quantity). Because spOccupancy is Bayesian, one can derive any of these sorts of trends in a post-hoc manner. Of course, if there are no temporally-varying covariates and/or random effects in the model when you fit it, then the resulting occupancy probabilities in "out$psi.samples" will not show any variation over time. However, if you have a variety of covariates in the model that change over time (and/or space) then changes in those covariates over time would lead to changes in occupancy probability over time, which could be assessed by deriving a trend in some post-hoc way. For example, one could calculate (at each site), the average annual difference between occupancy in one year and the next, do that for each posterior sample, and then average across the sites to effectively get a sort of "average annual change". An alternative approach would be to do something like what we did in the manuscript you reference. In that model, there was no specific trend parameter in the model, and instead we used the occupancy probabilities post-hoc in a simple linear regression model with a single covariate (i.e., year) to derive a trend estimate. Of course, an alternative to any sort of derived quantity or post-hoc approach is to simply include "year" as a covariate in the model and estimate a linear trend. However, if you are including covariates in the model that change over time then this may not be a good representation of the overall change that has occurred in occupancy probability (i.e., the linear year trend would represent temporal patterns not explained by any temporal changes in the covariates), and in such a situation a derived trend may be more useful for quantifying overall change in occupancy probability.
Jeff