There are three options:
1- The answer provided by Ozair Kafray works by making the document public. Anyone with the link can access the document.
2- With the answer provided by Sunny Molini, the Yahoo! user can create her own Google account using her Yahoo! email.
3- You should try without doing anything and see if the Yahoo! user can access the file from her own Yahoo! account. Both Yahoo! and Google support openId connect. I have shared files with Yahoo! users, but I haven't asked if they created a Google account or they used their own Yahoo! account. If you want to share with other account types, you should check if they can share using openId.
The answer provided by Ozair Kafray works by making the document public. Anyone with the link can access the document.
With the answer provided by Sunny Molini, the Yahoo! user can create her own Google account using her Yahoo! email.
You should try without doing anything and see if the Yahoo! user can access the file from her own Yahoo! account. Both Yahoo! and Google support openId connect. I have shared files with Yahoo! users, but I haven't asked if they created a Google account or they used their own Yahoo! account. If you want to share with other account types, you should check if they can share using openId.
Options 2 and 3 keep the file private.