Section 12A. The department may license and prescribe the terms for the construction or extension of a dam, road, bridge or other structure, or the filling of land, the driving of piles, or the making of excavations, in, over or upon the waters below high water mark of any river or stream within the commonwealth with respect to which expenditures from federal, state or municipal funds have been made for stream clearance, channel improvement or any form of flood control or prevention work, and the provisions of this chapter shall apply to all such licenses. Section twenty shall apply to any person authorized by the general court to build structures or do other work in said rivers and streams. Every erection made, and all work done on or within the banks of said rivers and streams, below high water mark, not authorized by the general court or by the department, or made or done in a manner not sanctioned by the department, without a license as hereinbefore provided, shall be considered a public nuisance. The attorney general and the district attorneys within their respective districts shall, at the request of the department, institute proceedings to enjoin or abate any such nuisance. This section and any such license shall not impair the legal rights or remedies of any person.