Baby screaming in pain!!

My daughter has a really bad diaper rash that has developed in the past few hours (she has only had it for about half a day) and she's pooped three times today and it's a odd color (kinda greenish) and she is screaming in pain, I haven't seen her this upset ever & it's really scaring me. I don't wanna run to the emergency room if it's not a big deal but we were at a family get together earlier and I'm worried someone fed her something she shouldnt have had.. anyways I tried putting baby petroleum jelly on it (we tried diaper rash cream earlier & it pissed her off & seemed to irritate her more) and I also tried to give her a warm bath (no soap) and she screamed bloody murder & I let her sit out with no diaper for a little bit to help air her out & now idk what else to do.. she won't sleep she's just crying miserably 😭