There are a lot of answers here, but one thing that seems to be missing from most of them is the relationship between a volunteer and a donor as it relates to running a charity.
I have a fair amount of experience working with both groups in a professional environment within the United States (so there may be some cultural differences), and I have run into multiple issues where donors, for lack of a better term, feel entitled to run things by virtue of being willing to give money. Some donors have management skills that prevent this from being an issue. Others... do not.
Managing donors is a major focus behind the scenes for all charities. Many decisions that might otherwise be considered unsound from a business perspective are made strictly to keep the donors happy. The more money these donors provide to the charity, the more process is adjusted to keep those individuals happy.
So while the donor in your situation was both rude and unprofessional, that's not something I suggest addressing, unless you really don't care about the success of the charity... which seems unlikely since you are willing to volunteer.
Which brings us to your role.
As a volunteer, while the donors may not appreciate you, chances are very good that the people who manage the day-to-day operations of the charity place a great deal of value on you and your time. Donors (or rather, their money) are the lifeblood of charities, but volunteers are the muscle to put that money to good use.
Your time is valuable, and if the charity is well run with a dedicated administrative staff, they will recognize that. Even if the donors don't care, the actual charity staff will, and they should be willing and able to provide assistance.
So, to address your situation...
The first thing I recommend is trying to keep some padding between these meetings and other appointments or obligations you may have. This isn't always possible, but it is worth attempting to reschedule if the proposed time is too close to something else you have to do, particularly for very short (30 minute) meetings. Even if the response is "no, that's the only time that works", you've already established that the time is inconvenient for you, and by showing up, you're being generous (remember: as a volunteer, your time is valuable, too!).
This sets the stage for the second recommendation, which is to set expectations up front. This isn't just for the meeting organizer; you need to set your own expectations. Do you have any flexibility if a meeting runs long? Are you willing to stay late, if the meeting runs over due to tangential discussion? What if it runs over due to discussion that is very much on topic and relevant to the stated purpose? How late can you stay?
The outcome of these questions should be your hard stop. What is the latest you can possibly attend before excusing yourself?
Your best bet is to tell the meeting organizer ahead of time. Assuming this isn't the donor, but someone who regularly works to run the charity, they then should be keeping track of the fact that you may have to leave if the meeting is running late.
Ideally, if your hard stop is within an hour of the stated end of the meeting, and the meeting has a history of running late, the meeting organizer will announce it at the start of the meeting. If not, you can simply announce it yourself:
I just wanted to mention that I have a hard stop at x o'clock.
This is unlikely to cause conflict, as donors typically understand conflicting schedules (even donors who are currently retired) and obligations.
Once you've established that you can't stay past a certain amount of time, this gives you a perfectly good reason to keep an eye on the clock (although arp's suggestion to use an alarm app is an excellent one.
If you say "I have to leave at 3pm", and at 2:15 you look at your watch, the donor can't really get much traction behind saying "If you have somewhere more important to be, then don't hesitate to leave." You (or the charity staff) have already told them that you have somewhere to be.
Even if you didn't start of by mentioning a hard stop, you can certainly bring it up if it seems like the discussion has gotten off topic. What typically works for me is to start off by validating the importance of what is being said, but point out that there is a more important topic that needs to be discussed, as well as a time limit:
These are all very good points, and we should work through them to get them resolved, but the primary goal of this meeting was to discuss x, and I think we may have strayed from that topic. I actually have another commitment in 45 minutes, so perhaps we can come back to this at a later date so we can make sure we get x resolved in the time that we have?