Yes, sorry to be a bit pessimistic . . . . if being rented out then it should have a licence to rent out. Local provinces are now employing many people to trawl thru websites such as Rentalia, Airbnb and Homeaway seeking out properties for rent which do not have a licence [VFT or VTR depending on your location]. The licence is both to protect the renter to ensure a basic standard is achieved a[fixed aircon may be a requirement] and also to control in some cases the explosion of more profitable short term rentals which have the effect of pricing out long term renters . . .
If no licence is in place I would make the current owner applying for and getting one [a visit is required by the townhall] a pre-requisite to the sale [fines of 150,000 have already been issued to Cadiz/Malaga province owners renting out without a licence].