Allergic maybe ?

I've been giving my 5 month old daughter enfamil gentlease formula an lately shes been having hard stools that makes her holler when she pushes an sometimes she can't push because it hurts an big. Theres blood on it to I believe from pushing. It's just been hard like solids. Is she allergic to the formula or the milk in it. If so any ideas to help her get better. She has an appointment coming up.