That’s what Quora does all the time.
But there’s also the First Click Free program, I think having support for this in Discourse would be a great idea.
Although I think that the proposed Referer: check is impossible in 2014 since Google uses https.
First Click Free
If you offer subscription-based access to your website content, or if users must register to access your content, then search engines cannot access some of your site’s most relevant, valuable content.
Implementing Google’s First Click Free (FCF) for your content allows you to include your restricted content in Google’s main search index. Our intention is to protect your content while allowing for its inclusion in Google’s search index. First Click Free has two main goals:
To include high-quality content in Google's search index, providing a better experience for Google users who may not have known that content existed.
To provide a promotion and discovery opportunity for webmasters of sites with restricted content.
In order to successfully crawl your site, Google needs to be able to crawl your content without filling out a registration form. The easiest way to do this is to configure your webservers not to serve the registration page to our crawlers (when the user-agent is “Googlebot”) so that Googlebot can crawl these pages successfully. You can choose to allow Googlebot access to some restricted pages but not others. More information about technical requirements.