Yes,You can do this some code.
First create a YES/NO product attribute is_usa_shipping
assign its value to YES on which products only ship at USA.
Then you need to remove your shipping methods when a customer select Shipping address international and Cart has items.
In this case, create a plugin around method on CollectRates
of your shipping method and change the behavior.
Suppose ,you want remove Table rate when you cart have USA item
<?php
namespace Devamitbera\CoreRewrite\Plugin;
class TablerateForFrontPlugin
{
protected $_logger;
protected $quoteFactory;
public function __construct(
\Psr\Log\LoggerInterface $logger,
\Magento\Quote\Model\QuoteFactory $quoteFactory
) {
$this->_logger = $logger;
$this->quoteFactory = $quoteFactory;
}
public function aroundCollectRates(
\Magento\OfflineShipping\Model\Carrier\Tablerate $subject ,
\Closure $proceed ,
\Magento\Quote\Model\Quote\Address\RateRequest $request
)
{
foreach ($request->getAllItems() as $item) {
$is_usa_shipping = $item->getProduct()->getResource()->getAttribute('is_usa_shipping');
$is_usa_shipping_value = $description_attribute->getFrontend()->getValue($item->getProduct());
// If not EQual USA Then disabled
if($is_usa_shipping_value && $request->getDestCountryId() !='US'):
return false;
endif;
}
return $proceed($request);
}
}
http://www.amitbera.com/magento2-how-to-disabled-free-shipping-method-in-frontend/