Баранецький - Баранецкий = Baranetskiy
Appx 900+ living in Ukraine today
Баран = Baran (means RAM in Ukrainian)
Very common surname in Ukraine. Appx 16,800+ living throughout UA today.
Baranczyce > Sambor > from late 18th century to 1918 was administered by ethnic Poles for the Austro-Hungarian Empire. It was predominantly a Ruthenian (Greek Catholic hamlet) w/its own GC Church. The filial RC Parish was in Wojutycze.
Unless you can show a direct link between your Immigrant Ancestor and Nobility Line, you cannot assume that there is a direct connection. As surnames became mandated by the master du jour, many serfs were given surname of lord, w/o any familial connection. LDS has copied Lineage Materials (1417-1981) available thru Lviv Historical Archives. https://familysearch.org/search/catalog/1396487?availability...