Yes, you can use margarine or a dairy-free butter alternative if you have dietary restrictions. Just make sure it's suitable for baking.