The fact that it is not an issue at school or in group settings like a birthday party is very good. It means that the sassiness isn't fundamentally how she is; it's a reaction. Unfortunately it's her reaction to you. This is a classic and very typical case of the old saying "Familiarity breeds contempt." Know that one? It means that because she is SO used to you (and probably because you are the one who must tell her "No, you can't do that" or "You have to stop now and do this chore" or "It's time for bed" etc.), she is willing to resist you. She wants her teacher's approval because school is still shiny and new and she wants to fit in; but at home she is asserting herself. This is indeed a stage and a typical one for most children around four, five or six years old. Please don't overreact to it because that gives her "negative attention" she seems to be craving -- she will know that she can push your buttons and that might satisfy her as much as if she were getting praise. You're not doing things wrong; she is learning how to get attention and this is the time to teach that she should not want ANY attention, but only positive attention.
So switch to a LOT of praise when she behaves well and listens well: "I noticed that you came the first time I called! That's great. Thank you for being so helpful." "I noticed that you picked up those toys and just said 'Yes, mom' so nicely when I asked. Thanks. That's very grown-up of you." "I know you wanted to do something else just then, but you didn't complain at all and did what I asked. That is great behavior. Would you like to do your thing now?" And so on. If that sounds like excessive praise for what we adults think should be everyday good behavior, remember, she is still very young and doesn't fully get the difference between negative and positive attention, so you may need for quite a while to make the positive, praising attention very clear to her.
When she is sassy or rude in speech, try turning to her very calmly and saying, "I'm sorry but I cannot hear you when you use those kinds of words (or that tone of voice) that is not respectful. A respectful voice does not sound like that. When you can come back to me and ask me that/tell me that in the way that is calm and nice, then I will be able to hear your words, but until then I can't respond to you." Basically it's a firm but calm shut-down from you. If you must, set a timer and tell her she can return to you in two minutes (or whatever works for her and you) and ask/tell you again in words and a tone you can "hear." Do this EVERY time she is rude or sassy and the consistency will help.
And then praise her a lot when she comes back to you and uses an appropriate tone and words!
Get some good books on kids' developmental stages -- ask the librarian at the local library. They will tell you loads about kids' typical stages and techniques to cope and get better behavior. Seeking negative attention is normal at this age and yes, you can nip it in the bud, but by being calm and firm rather than getting angry or punishing too much. She needs to know what is not acceptable to you, and what the exact consequences will be if she does something more than once (give one warning, one chance). But excessive punishment or yelling feeds into the "negative attention" she is willing to take.