Short answer: sometimes, but it depends on the bin. Many modern urban trash cans are designed as modular units, so common wear items—lids, wheels, hinges, locks, liners, and pedal or latch assemblies—can often be replaced. If the can was bought through a municipal contract, the supplier may be required to keep spare parts available for a set period. That said, not every public trash can is repairable. Some older, custom, or fully integrated models are replaced as a whole, especially if the body is damaged or the part is no longer stocked.
If something breaks, look for a manufacturer plate or model number inside the unit or on the frame. Check the original manual or warranty, then contact the city's public works or sanitation department and the supplier. Ask specifically whether the part is covered, whether it is in stock, and whether a technician is needed. For a city, the smartest approach is to standardize models and require spare-part availability in the purchase contract, because that keeps repair costs down and extends the life of the can.