Can I put a session variable in an extractor pattern to limit the results?

Extractor patterns can't accept variables. The extractor pattern is dealing with the last response HTML and doesn't have the means to snip some of that HTML out and replace with a token.

In cases where you would do this, the extractor pattern might look like:

name="ProductID" value="~@SKU@~">~#NAME#~<

The hope would be to get only the match for ~#NAME#~

The correct means to do this would be to:

name="ProductID" value="~@SKU@~">~@NAME@~<

You would then invoke a script that would compare the name you scraped to that you want:
if (dataRecord.get("NAME").equals(session.getv("NAME")))
{
        // Actions to take on match
}