Technically yes, but…if you are only taking one or two rocks I wouldn’t be too concerned but if you loading up a truck full then yes. The rocks may be used for drainage or landfill to keep the ditches from caving in. Here in my area of CA. people use a lot of river rock to landscape from our bountiful rivers but it is illegal to take river rock from parks and other public access places. If everyone took rocks there would be erosion issues.