I would let the pediatrician lead the way.
Any med can be given to an infant with a Doctor’s supervision. If the Doc says “Do it” I’m sure she will.
Dimetapp can’t be as bad for a youngun as whatever they give at the hosp for colick. We were in the emergency room when a distraught looking mother came in with a screaming toddler. I recognized that particular scream. 2 agonizing hours later, the nurse walked over, popped the youngun a shot. He was out in seconds. Wish I’d had that when mine was little. If not for him, for me.