There are no melee only or ranged only items though, only items with 1 particular effect that you need to be melee to activate, or a split-ranged attack you need to be ranged to utilize.
Similar to AP items on champions with no AP ratios or mana items on champions without mana, there are plenty of edge cases where a particular item is still useful on a given champion despite their incapability to utalize everything it offers.
Also - LoL is a game that lets you take any champion into any lane, build any item, use any mastery set up, and use any type of runes you want. You can get %crit damage masteries and runes on a champion without crit chance, you can build full AP on the ~8 champions with no AP ratios, you can build mana-intensive items on the ~18 champions with no mana. With that in mind - I don't see why you'd lock certain items from certain champions.