Fill a 4- to 5-quart pot halfway with well-salted water and bring to a boil over high heat.
Completely remove the yuca’s brown skin and the purple layer under it with a vegetable peeler. Cut crosswise into 3-inch cylinders and halve the cylinders lengthwise.
Boil the yuca, covered, until tender when pierced with a fork, 30 to 45 minutes. Drain the yuca and transfer to a cutting board. Remove any hard, fibrous cores with a fork. Cut the yuca into 1/2-inch-thick sticks and let cool and dry.
Meanwhile, position a rack in the center of the oven and heat the oven to 200°F. Line a baking sheet with paper towels. Combine the olive oil, garlic, onion, lemon juice, and 2 tsp. salt in a 1-quart saucepan and set aside.
Heat 1/2 inch of vegetable oil in an 11- to 12-inch straight-sided sauté pan or skillet over medium-high heat until shimmering hot. Working in batches of 12 to 15, cook the yuca, turning occasionally and separating the pieces as needed, until golden, about 6 minutes. Transfer the fries to the lined baking sheet to drain, sprinkle with salt, then transfer to another rimmed baking sheet and keep warm in the oven while cooking more batches. They’ll stay crisp in the oven for about 45 minutes.
Heat the olive oil mixture over medium heat, whisking occasionally, until fragrant and the garlic and onion are soft, about 4 minutes. Transfer to a dipping bowl and serve with the fries.