The history of border security predates Poncho Villa’s raid on Columbus, New Mexico and General Pershing Punitive Expedition by several years.
Border security was a problem along the Texas border before and after the Mexican war of 1846-1848. As a result of the Chinese Exclusion Act of 1882 there was a lot of smuggling of Asians into the U.S. from Mexico. Also there was a lot of smuggling of American goods into Mexico after the Mexican government placed a high tariff. Those Cochise County Cow-boys had a lucrative business of robbing Mexican smugglers in the 1880s and rustling cattle from Mexican ranches. During the early 1900’s the Arizona Rangers worked closely with Colonel Emilio Kosterlitzky’s Mexican Rurales dealing with smuggling and outlawry.
Mounted horsemen, “Mounted Guards,” for the Department of Commerce and Labor were patrolling the border as early as 1904 to deal with illegal entry. Mostly they dealt with the smuggling of Chinese. In March, 1917 Congress authorized separate border guards, still primarily to deal with the Chinese. Along with horses they used boats, motorcycles and automobiles. This coincided with the Punitive Expedition. The military and the Texas Rangers (along the Texas border) also acted as border security. The National Origins Act of 1924 authorized the establishment of the Border Patrol to prevent illegal entry on both the Canadian and Mexican borders.
Most of this comes off the top of my head from living here and having family from the Texas-Mexican border country around Del Rio and Eagle Pass. But the short answer is yes, the Texas, New Mexico, Arizona Rangers and the military would have had an influence on the creation of the U.S. Border Patrol.