I don't know why they would tell you that. It doesn't seem right.
From the Kellymom site:
Is my baby lactose intolerant?
If your baby is sensitive to dairy products it is highly unlikely that the problem is lactose intolerance, although many people may tell you so.
See Is my baby lactose intolerant? for more information.
Although cows milk protein sensitivity and lactose intolerance are not the same thing, they can sometimes occur at the same time, since food allergy can cause secondary lactose intolerance.
Sensitivity to cows milk proteins
Breastfed babies who are sensitive to dairy in moms diet are sensitive to specific cows milk antibodies, in the form of proteins (not lactose), which pass into the mothers milk. Cows milk (either in the mothers diet or engineered into formula) is a common source of food sensitivity in babies. Cows milk sensitivity or allergy can cause colic-like symptoms, eczema, wheezing, vomiting, diarrhea (including bloody diarrhea), constipation, hives, and/or a stuffy, itchy nose.
If your baby is sensitive to dairy in your diet, it will not help to switch to lactose-free dairy products. The problem is the cows milk proteins, not the lactose. Cooking dairy products may reduce but will not eliminate the allergens.
From the Australian Breastfeeding site:
Lactose intolerance is poorly understood in the Australian community. There are lots of myths and misunderstandings about it, especially when it comes to babies. Contrary to what you may hear:
There will not be less lactose in the breastmilk if the mother stops eating dairy products.
There is no relationship between lactose intolerance in adult family members, including in the mother, and in babies. They are different types of lactose intolerance.
A baby with symptoms of lactose intolerance should not be taken off the breast and fed on soy-based or special lactose-free infant formula.
Lactose intolerance is very different to intolerance or allergy to cows' milk protein.