The Hobbit and Return of the King were both produced by Rankin and Bass, and theoretically tell the whole story from start to finish, although the first two books of the trilogy are merely summarized in an intro in the RotK movie in an attempt to fit it into a two-hour window... Rankin was quoted as saying that decision came about because he didn't think audiences would sit still for a full adaption of the story.
The animated LotR by Bakshi is an unrelated project. Some time afterward, the rights to all three productions ended up with Warner Bros. who marketed them as a trilogy, which is where the confusion comes from that they're connected.