It sounds like you have a little temper tanrumer on your hands. She is possibly testing you to see how far she could get away with something when mom and dad are not there. Grandchildren ,may also perceive the grandparent as a secondary disciplinarian to the parents.
It would be helpful to have a routine with her and to enforce the same consequences that her mom and dad would have when she displays the undesirable behavior.
If you decide to do a time out as a consequence, about 3-4 minutes for her age is the appropriate time. It helps if you do not engage her verbally when she is in the time out and ignore the negative behavior(s). To children even getting attention when they misbehave (consequence) is still getting attention. She would try to redirect your attention back to her from the other sibling at all costs. That is understandable in a toddler.
My Kid is Acting Out and I'm About to Shout: Parenting Made Easy (CD book)
time out is all very well and good, but what happens if we're in a public place and there is nowhere to go for time out, or her behaviour is even endangering herself, her sibling etc. eg on the road-side. My difficulty is that I don't know why it's happening - it doesn't seem to be just about attention... she's already got that.
If you are out in public there could be the possibility of time out on a bench or any place where she could stay for several minutes. Consequences have to be immediate and age related. You could use another consequence (you know her best and what she would find unpleasant reinforcer)
Her behavior is not unusual for a middle child syndrome and a toddler. If you are suspecting other issues, she could be evaluated by a child psychologist.
It would be essential for her parents to be consistent in her consequences at home and to also let her know that the same rules apply when she is with you. Everyone taking care of her must be on the same page.