LINCANG, China—When warplanes involved in fighting over northern Myanmar streaked across the border into China, an errant bomb killed Chinese farmers and put Beijing in a bind over a conflict it has tried to avoid.

The explosion a week and a half ago came after jets had circled the frontier for days, occasionally bombing targets in the Myanmar region of Kokang. Yang Jinrong and other Chinese farmers living along the border had looked on from afar with little concern. Fighting between Kokang rebels and Myanmar government troops...