The direct object in the first sentence is "una cebolla" (an onion).
The direct object pronoun in the second sentence is "la" (it), which replaces "una cebolla" from the first sentence. The full sentence with the direct object pronoun is "¿Puedes usarla?" (Can you use it?).