Using pre_get_posts to target a query in the sidebar

I think you can achieve this by adding a query var. And then you can use something in pre_get_posts like this:

if ( get_query_var( 'your_var' ) ) {
    // do something
}