The DPD gives good advice on this topic. Basically, there is one exception to when you can't indirect object pronoun. Here are the rules copied from another answer I gave a while back.
- If the object (indirect or direct) is a person pronoun (mí, ti, etc) and included anywhere in the sentence, you must include the pronoun with the verb (indirect or direct): Me castigaron a mí but not *castigaron a mí (DPD “pronombres personales átonos” 5.1)
- If the object (indirect or direct) comes before the verb (OSV or OVS sentences), you must include the pronoun with verb, animate or not: A los problemas del mundo no les doy mucha importancia, but not *A los problemas del mundo no doy mucha importancia, except for emphatic statements (ibid. 5.2)
- Verbs of affection require the indirect object pronoun except for the so-called universal quantifiers (todo, nadie, etc). (ibid. 5.2(a))
- When you are being intentionally emphatic or contrastive, you cannot have the indirect object pronoun. For example A ti lo daré, a él no. Here, saying Te lo daré, a él no would sound very odd. (ibid. 5.2)
If the indirect object comes after the verb and isn't a personal pronoun (so a Juan, a los estudiantes or al problema), then it is almost always completely optional, if quite common especially in speech. The handful of exceptions include gustar and similar verbs, which do require it except when the indirect object is a universal quantifier like nadie/todo/etc. in which case it's once again optional (ibid. 5.2(a)).
All this said, in your example, we're not looking at a indirect object but an direct object. Normally, direct objects are bare/unmarked (like the subject), and indirect object pronouns are introduced with a or para. However, some direct objects are introduced with a. There are two situations this can happen in:
- The direct object is animate, that is, a person or an animal of roughly equal stature like pets (very common).
- The direct object could be confused for the subject (very rare).
If you wanted to use a direct object pronoun, you should use lo, although le is allowed both formally (for masculine animate singular direct object pronouns) and in leísmo non-standard usage (general use of le for direct object pronouns). This is not a case, however, where the direct object allows for coappearance. Hence, your le will only be interpreted as an indirect object pronoun, and we do don't know for whom you're taking out the dog, or, we could interpret el perro as for whom, but then we still don't know who/what you took out out for a walk.