Section 53A. An officer or department of any city or town, or of any regional school or other district, may accept grants or gifts of funds from the federal government and from a charitable foundation, a private corporation, or an individual, or from the commonwealth, a county or municipality or an agency thereof, and in the case of any grant or gift given for educational purposes may expend said funds for the purposes of such grant or gift with the approval of the school committee, and in the case of any other grant or gift may expend such funds for the purposes of such grant or gift in cities having a Plan D or Plan E form of government with the approval of the city manager and city council, in all other cities with the approval of the mayor and city council, in towns with the approval of the board of selectmen, and in districts with the approval of the prudential committee, if any, otherwise the commissioners. Notwithstanding the provisions of section fifty-three, any amounts so received by an officer or department of a city, town or district shall be deposited with the treasurer of such city, town or district and held as a separate account and may be expended as aforesaid by such officer or department receiving the grant or gift without further appropriation. If the express written terms or conditions of the grant agreement so stipulate, interest on the grant funds may remain with and become a part of the grant account and may be expended as part of the grant by such officer or department receiving the grant or gift without further appropriation. Any grant, subvention or subsidy for educational purposes received by an officer or department of a city, town or school district from the federal government may be expended by the school committee of such city, town or district without including the purpose of such expenditure in, or applying such amount to, the annual or any supplemental budget or appropriation request of such committee; provided, however, that this sentence shall not apply to amounts so received to which section twenty-six C of chapter seventy-one of the General Laws, and chapter six hundred and twenty-one of the acts of nineteen hundred and fifty-three, as amended, and chapter six hundred and sixty-four of the acts of nineteen hundred and fifty-eight, as amended, apply; and, provided further, that notwithstanding the foregoing provision, this sentence shall apply to amounts so received as grants under the Elementary and Secondary Education Act of 1965, (Public Law 89?10). After receipt of a written commitment from the federal government approving a grant for educational purposes and in anticipation of receipt of such funds from the federal government, the treasurer, upon the request of the school committee, shall pay from the General Fund of such municipality compensation for services rendered and goods supplied to such federal grant programs, such payments to be made no later than ten days after the rendition of such services or the supplying of such goods; provided, however, that the provisions of such federal grant would allow the treasurer to reimburse the General Fund for the amounts so advanced.