Yes you can do that with flexbox or grid but what you can’t easily do is have the logo centred in the viewport. It can only naturally be centred in the space between the links either side unless you compensate to make the left and right sides always the same width (e.g have 30% width left and 30% width to the right).
The example you linked to does not centre when there are only one or two links on the right (or vice versa).
If you let me know the requirements I can offer some code later today when I am back at the computer .
Here are some old codepens that show possible solutions if perfect centring is required;
It still may be that you will require some JS to spread the menu if you have an unknown number that you want spread left and right. I may have overlooked that point