To give anonymous users media permissions, know that Media module's permissions don't work as you might expect:
- Import media files from the local filesystem: this is not for the media widget. You don't need to turn this on.
- Edit media: You need this to upload files via the media widget.
- Add media from remote services: straightforward.
The Library tab is not protected by any permissions. It's always included with the media browser plugin (aka the media widget).
You can get around this by implementing:
- hook_permission() to create some finer tuned media permissions.
- hook_media_browser_plugins_alter() to implement fine tuned permissions.