Is it possible to pass variables as arguments to *.libraries.yml?
Instead of defining the library in the .libraries.yml file, you should add it using hook_library_info_build(), which is the hook to add dynamic library definitions, as in your case.
function mymodule_library_info_build() {
  $libraries = [];

  $js_path = 'the dynamic path to the external JavaScript file';
  $libraries['external.bc.js'] = [
    'version' =&gt; '1.x',
    'js' =&gt; [
      $js_path =&gt; ['type' =&gt; 'external', 'minified' =&gt; TRUE]
    ],
  ];

  return $libraries;
}