Hello BW I wouldn't say it was ungrammatical, exactly; but there are some strange aspects to it. For instance, it might be better to say "holding a dead bird in its mouth". Is it part of an exercise in which you have to use several clauses in one sentence?
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Very lame. So perhaps you should stick with your version.
"When the cat with its marble eyes and a dead bird in its mouth ran in front of me on the sidewalk, I thought it looked like a devil."