It is grammatically correct to use le, la, les ... for objects. Those pronouns are not restricted to persons, there are no separate pronouns for objects. For example:
Tu connais ce livre?
Oui, je le connais.
is entirely correct, idiomatic, etc etc., and there isn't really any other way to say that. In particular, you couldn't say Oui, j'aime ça, using ça to mean le livre.
Now, one thing to note, is that in the example above, le refers to ce livre, which is a specific livre in the conversation. If there is no specific object that the pronoun in the answer would refer to, it's a bit more questionable, in terms of usage. Here are possible answers with approximate indications about usage frequency (subjective):
Tu aimes le riz? (rice in general)
Oui, j'aime ça (ça = rice in general, quite common)
Oui, j'aime! (no pronoun, quick and simple, common in conversation)
Oui, je l'aime (possible, not common, sounds "funny")
The issue is not that rice is an object, but rather that le riz is not specific. If it is a specific eg brand of rice, the situation is a bit different, and here are possible answers, with again an approximate indication of their usage frequency (subjective again):
Tu aimes ce riz? (ce = some specific rice)
Oui, je l'aime (l' = ce riz, specific, common)
Oui, j'aime! (no pronoun, quick and simple, common in conversation)
Oui, j'aime ça (possible, maybe less common)