二者都可以,例如:

1、Her position in the party has strengthened in recent weeks.最近几个星期以来,她在党内的地位有所增强。

2、There are deep divisions in the party over the war.党内对于这场战争存在着严重的分歧。

3、I take it you won't be coming to the party?我想你不会来参加聚会吧

in the party还是to the party

要看句子要表达的意思。in the party表示在这个聚会里。to the party 如I will go to yhe party,意思是我会去这个聚会。