Yes you can share with users who have yahoo or gmail email addresses. If you require external sharing with authenticated external users then it requires a Microsoft account. If you share with yahoo or gmail, the users will be prompted to create a Microsoft account when the user accepts the sharing invitation.
Sharing documents as a guest link does not required the sign in.
"Share a document, but don’t require sign-in. Share a link to a non-sensitive or non-confidential document with people outside your organization so that they can either view it or update it with feedback. These people do not require ongoing access to content on your internal site."`
But if you want share a site or need more trail who access the file / sites then you need to share it with sign in option.
Share a document and require sign-in. Provide one or several people outside your organization with secure access to a specific document for review or collaboration, but these people do not require ongoing access to other content on your internal site.
I have a Gmail account and when I went to the usual Microsoft Account
Sign up page Gmail wasn't even an option (only hotmail, live, and
outlook were available). I used this link https://signup.live.com and
simply used my normal gmail account where an email address was asked
for. After filling out the needed information everything ran smoothly.
All I had to do was verify my email. Easy.
Yes, You can share with external users like yahoo and gmail etc. You need to enable this setting at SharePoint Admin center as well as Site Collection level.You can also set the expiration dates as well.
Very important : To be able to send anonymous link to gmail: Go to Sharing in Admin centre --> Under Additional Settings --> add gmail.com to the exception list