You would need to use context clues to know whether the reflexive pronoun or indirect object pronoun are being used. By memorizing the most common reflexive pronouns, and remembering that "le and les" do not appear as these you could avoid this issue most of the time. However, an advanced understanding of Spanish points to the fact the reflexive often does work as an indirect object pronoun, but with the action always being done to oneself. For example, in the sentence "Ella se hizo una artista muy talentosa" if you know "hacer" has a reflexive form "hacerse" which means "to become or turn into", you could pick up that this is the correct translation right away. However, if your inclination is to keep "hacer" as is and translate as an indirect object pronoun, it would still translate as "She makes herself (/to her) into a very talented artist". Here, "se" stands in as "le", which in typical indirect object form would only be used if a direct object after it began with "l", but you can see the relation. Nonetheless, it is not always the case that verbs and their reflexive counterparts are this close in meaning (though this is often the case). So it is best to translate the sentence using either, and then picking which one makes the most sense.