I think Sharon's comment was a bit snarky, but it is kind of rude to walk up to someones desk, ask for candy, and not even bother with a hello or some pleasantry. Since it bothered Sharon enough to comment, I think Katie should have said, I'm sorry, How are you, or something like that and that then should have been the end of it.
At the party, Katie was rude. Assuming she wanted to make up for the previous incident (which is the nicest spin I can put on it), the right thing to do would have been to have come by, said hello, commented on the party, maybe how nice Sharon looked, did she have plans for the holiday, or something like that and then made an excuse to leave. Something like, I need to get back to my table, but wanted to come by and say hello.