 Via context and common word order, it is evident that "lata" is not the agent despite it being marked with "sa" as well (in this case, it is used as the general oblique definite noun marker).It is not the first noun in the sentence (as the agent/doer usually is) and nor can a can cook rice on its own (context).Here, the location/indirect object "lata" is marked with "ang", the general direct noun marker.