The rule of thumb for volunteer work for those on non-immigrant status is:
(a) is the organization or its works are clearly non-profit and/or charitable and
(b) is the work being done is normally done by unpaid volunteers.
So, volunteering your time at a for-profit business would not be allowed. You couldn't volunteer as a software developer for Microsoft.
Providing a free service at a non-profit for a position that is normally remunerated would not be allowed. You could not be the unpaid CEO of the Red Cross, because that position is typically a paid position.
In your case, for example, if you would be doing activities at your shelter for which the local humane society pays its employees, that would be illegal work. If the head of the local humane society gets paid for her services, then you could not be the head of your shelter.
Simply refusing to accept money for work that normally paid for is not sufficient to make volunteer work legal.