(Well, you don’t have to worry about the r’tzei/yaaleh veyavo issue by seudah sh’lishis, even though Sunday is Rosh Chodesh–guess why!)
On Shabbos Rosh Chodesh , if a person began the fourth beracha in bentching (I.e, he said past the first 6 words of the fourth beracha–[now is not the time to explain why the first 6 words]) , and then realized that he forgot retzei, in the first 2 meals he must go back to the beginning of bentching ; when doing so, he says both retzei AND yaaleh veyavo (even if he did not forget yaaleh veyavo the first time).
Some things that one may do in a Shul:to bind sefarim for the Shul ; to make a seudas mitzvah (includes a kiddush ); to give out food and drink after a ta’anis; to give out candy to children learning or saying tehillim ; someone learning there on a steady basis can even eat a meal there;
There are more, but this suffices for now.
Try to extrapolate as to what is ossur!