Don't know about EU laws, but in Russia every apartment rent agreement I've seen (which is statistically insignificant amount, maybe 4-5 agreements) had explicitly prohibited reselling/subrenting.
Same in Bolivia. You're even explicitly disallowed to rent rooms out to people unless you notify the owner. I agree with it to, if I were to own an apartment and rent it out, I wouldn't want any random person to live in my home.