Yes. The standard warranty applies to all accessories (cables, power adapters, etc) that came in the box with an Apple device. If you have AppleCare the devices are included in the extended plan. Also, separately purchased accessories have a standard 1 year warranty in the United States.
I would say it's pretty difficult to know which accessory belongs to what device. I brought in a Lightning cable once to ask if I might get a courtesy replacement. When a supervisor came back I was told I could get it replaced "under warranty" if I could demonstrate that I had an Apple device that came with one that was still in the warranty period. The replacement was done as a transaction as a refund and purchase of the same item, although it was pulled out of the box which I didn't get to keep. I was told that I had the full 1 year retail accessory warranty from that date.
What kind are you using? I'd recommend the 12W one that's designed for the full-sized iPad and iPad Pro, which costs the same $19 (US) retail as the 5W cube adapter. It will provide the maximum possible charging current for iPhones with a USB-A to Lightning cable.