Yes, you can certainly use margarine. The taste will be slightly different, and in my experience, the cream will also be slightly firmer.