YANBU and well done for standing your ground, OP
"All they could afford" - then what have they done with all the money people have paid?
They were getting your full session fee from the ticket price (which I assume you usually set to a point which covers your overheads, your time and give you some profit?) without having to pay any overheads beyond ingredients as you were giving your time for free, they own the hall and already pay the bills for heat/light/water etc so surely they could still make a massive profit for the charity whilst providing all of the ingredients you require to do the job properly. It's better to spend 40% of the ticket cost on overheads and 60% profit for the charity (even if they'd have preferred to have 75% profit) than get 0 profit from cancelling the event due to their stubbornness over their budget and end up costing money because they now have to spend time refunding people and are left with ingredients they cannot use.
I would be sure to get out ahead of the news though - post something on social media to make it clear that you wanted to do the session but the committee made it impossible for you to do so.
"It is with great disappointment that I have to announce that my baking class for Skinflint Charity that was due to take place this evening has had to be cancelled.
I was very much looking forward to being able to share the Baked Blueberry Pavlova recipe with you tonight but Skinflint Charity, who insisted on providing the ingredients despite me offering to source them from my usual suppliers to ensure everything was correct, have not provided me with the ingredients I require or have substituted them with inappropriate alternatives that would change the quality and taste of the recipe. After repeated discussions asking them to rectify this situation so that I could ensure you all receive the usual standard of class that I provide they have refused, citing budget constraints.
Had I been made aware of a specific budget I would have adapted my class offering appropriately but at this late stage it is too late to do this and I was left with two options: take the class knowing that we would not be able to produce anything close to the usual standard I expect of my classes or cancel to ensure that people do not waste their time and my professional reputation is not damaged due to the fact you would not be getting the service you paid for despite paying the same ticket price I usually charge
Therefore I made the difficult decision to withdraw from the class as I could not in good conscience allow it to go ahead knowing that the ingredients provided would result in a dish that was nowhere near the standard I would expect to present. I would like to offer my apologies to those who were looking forward to attending this evening as I was, but I am sure you can understand why I have had to take the action I have done and hope to see you in a future class where you will get the service you have paid for.
^Anyone requiring a refund for their ticket should contact Skinflint Charity directly^
Best wishes, OP"