According to how the stat formula works, this is possible for certain Attack IVs if your Marill has a nature that lowers Attack. If your Marill's nature does not lower Attack, then you must have done something wrong, because with the information you've given, its Attack should rise by at least 1 when it levels up to level 10. (I wrote a program that checked the outcomes for every possible IV, so this should be accurate.)
Off the top of my head, make sure your Marill is actually defeating the Patrat, or at least participating in the battle - the Exp. Share in the sixth-generation games doesn't share effort points, only level experience. (EDIT: No, apparently I was remembering this wrong, sorry.)