There are some water based paint-brush cleaners and paint strippers on the market. I prefer the ones that have a goopy jelly consistency ( 3 M made one ) as they are less likely to damage the adhesive in the backing of the carpet. Brush onto the surface of the stained area, give it some agitation, dwell time, flush and towel off.
They do not smell like most solvent based solutions but wear gloves.
If this carpet is olefin, you should have no problems.