What Capability is required to let a role RUN code in Edit Theme?

WordPress does not have the ability to prevent code from running based on who added it. That’s not the problem. The problem is far simpler: the code they added is specifically written to not work for anyone but administrators:

 if ( empty( $_GET['geolocate_listings'] ) || ! current_user_can( 'administrator' ) ) {
    return;
}

You can change 'administrator' to any capability that you want to control who can trigger this code.