Do you need Nintendo Online membership to play Overcooked 2 with friends on the same console?

I don't think that a local multiplayer mode will ever require a Nintendo Online subscription, since you are playing offline content. This includes playing on "split-screen" or wireless play across different Nintendo Switch consoles.

According to this old answer, quoting Overcooked 2 eShop description:

A Nintendo Switch Online membership (sold separately) is required for online play

So you should need Nintendo Online only for online multiplayer, not the local one.