i’m working on a theme component for this and will have it this week. i do expect this to be in core in future though.
also “navigation menu” not sidebar
i’m meantime you can check out my existing navigation menu modifier component that includes some options for showing and hiding sections for anon and regular users.