I don't think 'refused' works well in this sentence. 'Refuse' has a sense of argument or strong disagreement, at least in my mind.
In your situation, there isn't really that sense of conflict. He asked for chocolate, and she offered him lemon instead. But since he happily accepted the lemon cake, there isn't really that sense of argument.
Now, if the boy still demanded chocolate, and the mother still would not give him chocolate, then you could say that she refused to give him chocolate. In that scenario, you could also say the boy refused the lemon cake, and demanded chocolate.
Student or Learner