I agree, it may provoke an attack on you. But if the goal is to first try to protect my little dog or cat.. I'd personally still pick it up.

An element to consider is the distance to..the stance of.. and the body language of the approaching dog. Too complex to convey simply in a thread here, but my personal rule of thumb is as follows (and I've done this with a darn large dog, too. Not just a little one): If I have time/space to interdict an attack by changing the "aspect" of my dog, that's what I'll try first. Turning, picking up, etc. My last German Shepherd would drop to a down-stay and hold it while I dealt with the oncoming dog. That is.. my dog would break off eye contact and "attitude" towards the other dog. But that takes work and training in the specific situation. That's beyond the initial question in the thread. Certainly this doesn't always work. Certainly one might still get bitten by the oncoming dog. But that's what I'd try first FWIW