I was wondering if there is a way to link a document library folder (within a main site) to the document library of a sub site in SharePoint Online (Office 365)?
If you mean that your main site’s document library should display all your sub site library’s documents, you can do that as a redirection.
But you can run a workflow to copy documents to main site library whenever it is added to sub site.
Hi I am not entirely sure what you mean by “link to a document library”, but have you seen the “Link To Document” content type? I wrote a blog post explaining how to use it.
How to use a ‘Link to a document’ in place of a real document in SharePoint.