Is it possible to retrieve shipping quotes on the fly through an external API when a user purchases something through my eBay store?
eBay (and previously PayPal) does not expose the shipping quotes API for various reasons (including technical, business, and pricing reasons) so the short answer is "no, there is no way". In fact it gets the quotes from an external (independent) source.
You can try integrating with Pitney Bowes or a similar provider to get the shipping quotes but that solution is for large players.
UPDATE: Since your company is the one hosting the quote service...
When a user purchaes an item on ebay a "purchase notification" is sent out to a merchant. There are a few different versions of it which you can read about on eBay's dev site. One of them is ItemSold Notification that you can use.
UPDATE 2:
If I understand you correctly you are trying to inject some business logic into eBay's purchasing UI? I'm afraid you are out of luck here. You have limited (pretty much none) influence on the eBay's web flow.