Yes, this is definitely possible!
My recommended tool to accomplish this is Solid Explorer File Manager by NeatBytes.
In addition to being a great file manager, it also creates a Share target named
"Save to..." for saving any content as a file in your storage. I've personally used it for this purpose hundreds of times, and it works quite well.
Another tool that may interest you is the wonderful ShareListener by Red Apps LTD. It's a simple tool without any UI of it's own that is:
A simple app that registers itself as a Browser. When opened, the link is then shared and can be opened with any apps that listen for the share intent.
Useful for apps that don't have a share functionality but allow users to click on links.
Source: Google Play store description.
Since it needs no primary UI of its own, here is how it looks to the user:
Source: Google Play store screenshot.
The magic of ShareListener is that when you try to share a link. Many apps will only allow you to open a browser. ShareListener will allow you to share links with non-browser apps, including Solid Explorer! When used in conjunction with Solid Explorer's Share target, you can quickly save any link to storage instead of opening it in a browser.