He is only playable in the 16-bit game Sonic & Knuckles, which was released as a separate cartridge. You could then slot the Sonic & Knuckles cartridge on top of a Sonic the Hedgehog 3 cartridge to unlock the "Lock-on" feature, allowing you to play as Knuckles in a new version of the game.
While Knuckles isn't directly playable in Sonic 3, he does appear as a boss character in the game.