Butter is a dairy product and can contain milk proteins, even in trace amounts. So it should be treated as a milk allergen.
Butter being mostly fat does not make it safe for babies with cow's milk allergy.
Butter made from goat, sheep or buffalo milk is not automatically a safe alternative for babies with cow's milk allergy either.
When ghee is made, most of the milk proteins are removed, but traces can remain. So with a diagnosed milk allergy, do not use it without talking to your doctor or a dietitian.
Milk allergy and lactose intolerance are different conditions. Butter usually contains very little lactose, but low lactose does not mean it is safe with a milk allergy.
When you offer it for the first time, start with a small amount and watch how your baby responds.
Signs of an allergic reaction can include hives, lip swelling, vomiting, coughing or wheezing. For serious signs such as trouble breathing or swelling of the tongue or throat, call emergency services right away.
If your baby has a diagnosed milk allergy or has reacted to dairy before, do not try butter before talking to your doctor or a dietitian.