In S2 Cordelia was around the gang a fair bit. Her life was in jeopardy alongside them in WSWB, Schoolhard, Reptile Boy, Halloween and Bad Eggs, she was saved by them and expressed gratitude in Some Assembly Required, and in Schoolhard, The Dark Ages, What's My Line and Ted she actively participated in research, sharpened stakes, or even battled with them to stop the threat. By the time we get to Surprise I think it makes sense that she would be invited to Buffy's birthday party. I very much see Willow inviting her despite still not liking her all that much as it was the polite and customary thing to do and that's just Willow (the same reason she invites Spike to Buffy's birthday in Older and Far Away despite having no idea of Buffy and Spike's secret relationship).
As for why Cordy would accept her invitation and attend the party, I don't think this would raise many suspicions. Why did she help sharpen stakes in the school library? Why was she eager to help Giles? Why agree to drive Xander to Buffy's house? Why follow the Scoobies into the library to talk about Daryl? For that matter, why get herself involved in Buffy's issues at The Bronze when she was being nasty to her friends and Angel? I think it's clear that Cordelia was circling the Scoobies since probably Out of Mind, Out of Sight. At the end of that episode was genuinely grateful of their help and I think she secretly would've yearned to part of such a close knit group after expressing to Buffy how lonely she was earlier in the episode. She approached them at the end of that episode and wanted to reach out but lost her nerve once Mitch approached her ("Please don't tell me you're hanging out with these total losers"). In Prophecy Girl her attitude towards Willow has noticeably softened and after going through through that nightmarish experience with them and then partying at The Bronze with them later in the episode, I think she longed to join them. Even in Inca Mummy Girl Buffy and Cordelia have a pretty friendly rapport at the museum when they discuss their exchange students.
Cordelia was around a lot. It makes sense to me that she was invited and it also makes sense to me that they didn't find it suspicious that she'd attend.