Streetcars can operate on rails too, and thus are not implicitly buses.
There is evidence of this still embedded in the pavement of cities which have, or used to have, above-ground trolley systems.
Streetcars are generally not called trolleys - unless they are heritage streetcars using trolley poles, generally only in the States. Modern streetcars or trams use pantographs.