Heat oil in a large skillet over medium heat. Add ham and onion. Saute until ham is browned and onion is softened, about 5 minutes. Add beans, cilantro, sofrito, and vinegar. Cook 5 minutes.
Stir in rice and water. Bring to a boil, reduce heat, and simmer, covered, until rice is tender, about 15 minutes. Garnish with additional cilantro if desired.