Legislation aimed at preventing Massachusetts nonprofit health insurers from paying their board members could also end compensation for directors at other major charitable organizations. At least eight of the 50 largest nonprofit foundations in Massachusetts compensate their directors, in some cases as much or more than health insurers, according to a Globe review of annual filings with the Internal Revenue Service. For instance, the George I. Alden Trust, a 99-year-old private foundation in Worcester, pays each of its four directors $130,000 a year. The Ellison Foundation in Lynn paid trustees up to $100,000 each in 2009, the most recent year for which information is available. And board members at the Amelia Peabody Charitable Fund in Boston receive annual payments of $80,000. Under the proposed law, the charities, which support programs and services from the arts to education to the environment, would need permission from the attorney general to keep compensating board members.