I beleivebelieve that this is an episode from Luis Buñuel's surrealistic comedy "Le Fantôme de la liberté" (The Phantom of Liberty).
From the plot description on Wikipedia we have:
The professor continues, using a dinner party at his friends' house to illustrate a point he is making. We then cut to the 'dinner' party which is being held in a modern bourgeois apartment.
The guests are seated around the table on flushing toilets. They politely discuss various issues around the topic of defecation whilst publicly using the toilets that they are sitting on. When a guest is hungry, he excuses himself and retires to the dining room, a private cubicle, to eat food.
That matches your recollection.