Yes - in order to be heritable, a change must be made to the DNA (no other change will do) of the egg/sperm cells of the individual.
This is an overstatement.
As an example, we are well-aware of pathogens that pass from mother to child either in utero, in the birthing process, or through breast milk -- HIV is just one example among many. But, of course, the only way we know about these pathogens is because they do bad things to us which is why we were looking for them; there may well be unknown symbiotic "pathogens" that are passed down in this way. A change in these symbiotes -- say, someone decided to snack on penicillin for most of her life, and made her symbiotes penicillin-resistant -- would be acquired and passed down to children.
Fifty years ago, someone might have written "in order to be heritable, a change must be made to the nuclear DNA of the egg/sperm cells," not realizing that mitochondrial DNA is also inherited. But if there are any RNA-only protein templates (something we've not been able to confirm), those would also be inherited maternally. We know there are self-reproducing protein templates (they're called prions) and these could also be inherited if they managed to get into the egg cell.
The problem is that we know of no method to "learn" any of these changes. In theory, any of these methods could provide a method for Lamarckian inheritance if we could figure out a way for a creature to learn how to make a particular strand of RNA....