Your rights are that whoever buys the house has to honor the remaining months left on your lease. Why the Realtor is tell you this i don't know. But i would be looking for another place also. Don't want to wait till the last minute and when your lease runs out then start looking. Start looking now.
Your lease is your amswer
They would refer this question to call clear and seek legal help. They can't offer legal advice.
Thanks! Your answer is awaiting moderation.