Actually one day is enough for you to go around by car. But if you wanna go on foot, maybe you need around two days.
There are many spots for rice terraces. I would recommend hire a one-day car with local driver who knows hidden spots and know his way around because you will get the best experience ever. You can take a day bus or a sleeper bus from Kunming to Yuanyang. And I would recommend to check the Cliff House Yuanyang out if you are looking for a place to stay.