ben...suggestion....
more info required. You haven't given enough info to help decide. Tell which part that you have. What is it's date code? Carefully measure (very carefully) the distances between holes or pins and holes on the part you have. What are the pin / hole diameters?
I think it might work...but it's a crapshoot. You may need to have new locating pin holes drilled, or even move the two pins from where they are now on both barrel and frame side.
Of course cylinder / bore alignment is the primary concern, but it would be nice if the load plunger is centered too.
I would guess that you wish to rebarrel a pitted San Marcos but you didn't say which way you are going. If you knew someone with a new Pietta barrel, you could test fit. Or you could take your good frame to a seller with a new Pietta and ask them to let you test fit.
If it looked good, you would probably then have a chance for a new Pietta barrel on Eeek Bay to fit your frame, if you asked the seller about the barrel's date code. Remember a new .32 steel 1851 is $180 at Cabela's right now.
You could do all this while searching for a correct brand barrel as swathdiver said.
Good luck, post more info, report progress.