Yes, you can use margarine instead of butter in the casserole, but the flavor will be slightly different.