Can an explanatory variable be both a random and fixed effect simultaneously?

#1
Hello, and thank you for reading.

I am trying to test for what environmental variables (3 continuous distance variables e.g. distance from nearest village) influence 1) species richness at the site level (continuous variable) and 2) community composition at the site level (coordinates of NMDS output; continuous variable).

I understand that this would usually warrant a straightforward GLM - however, my data comes from two areas with different protection status (PA). Hence, in addition to needing to use PA status as a random effect to account for pseudoreplication (different variances in both sites), I would like to test if PA status has had an effect on the aforementioned relationships.

After reading around, it seems that a mixed-effect linear model may be best suited to this case. However, I am unsure whether it is correct to include PA status as both a fixed effect and a random effect. Additionally, I thought that nesting site location within PA might be required - although each site only comprises of a single data point and it doesn't seem to work in R (would this be a programming or conceptual error on my part?).

Would anyone have input on this matter? Thanks in advance.