I'm an experienced mum, but not an experienced gran, and am looking forward to experiencing the difference!
It's not clear from your post how much in advance the "not able to go out" was signalled, and I think this can make a big difference. I agree with absentgrana about planB. I would say "oh, it looks as if it might rain - if it does we can't go out" (and is that always the rule? that may cause confusion)
then "oh, if we can't go out, what could we do?" signalling any "no-go" areas and having your own planB in mind.
I also agree with Jess about the "naughty step" - it was never part of my parenting, and I personally don't like it. I do know it works well for some parents/grandparents and that's fine.
I do think that 3-6 is a difficult age for understanding "rules" - and a child who is just working out their own way of dealing with the world can get very confused.
Although children obviously do get used to different rules in different houses they visit, it is not surprising that they get confused sometimes.
One of my favourite stories of of my friend's child, aged 5, was on an extended visit to grandma. When mum arrived to stay for the weekend, she was a bit surprised to find her daughter, on getting out of the bath, say imperiously "fetch me my slippers". She said, of course "you fetch your own slippers". "No!" shrieked the little girl "here, it is FORBIDDEN to walk in bare feet!".