Yes, he was Elijah (Matthew 11:13-14) - "For all the prophets and the Law prophesied until John. 14"And if you care to accept it, he himself is Elijah, who was to come."
No, he was not Elijah (John 1:19-21) - "And this is the witness of John, when the Jews sent to him priests and Levites from Jerusalem to ask him, "Who are you?" 20And he confessed, and did not deny, and he confessed, "I am not the Christ." 21And they asked him, "What then? Are you Elijah?" And he *said, "I am not." "Are you the Prophet?" And he answered, "No."
The teaching of reincarnation is against the Old Testament; therefore, Jesus was not teaching that John the Baptist was Elijah reincarnated. So, what did Jesus mean when He said that John the Baptist was Elijah? We see in Malachi 4:5 this prophecy, "Behold, I am going to send you Elijah the prophet before the coming of the great and terrible day of the Lord." Jesus is referring to the prophecy concerning Elijah. We see that the coming of Elijah was in the spirit of Elijah, which is so stated in Luke 1:13-17. The context is when Zecharias, John's father-to-be, was performing his priestly duties in the temple (Luke 1:8ff). An angel of the Lord appeared to Zacharias and said,
"Do not be afraid, Zacharias, for your petition has been heard, and your wife Elizabeth will bear you a son, and you will give him the name John. 14"And you will have joy and gladness, and many will rejoice at his birth. 15"For he will be great in the sight of the Lord, and he will drink no wine or liquor; and he will be filled with the Holy Spirit, while yet in his mother’s womb. 16"And he will turn back many of the sons of Israel to the Lord their God. 17"And it is he who will go as a forerunner before Him in the spirit and power of Elijah, to turn the hearts of the fathers back to the children, and the disobedient to the attitude of the righteous; so as to make ready a people prepared for the Lord," (Luke 1:13-17).
So, we see that John the Baptist was in the spirit of Elijah, but not actually Elijah reincarnated.
There is, however, a little more information that might prove interesting. Elijah wore, most probably, a camel's hair girdle. "And they answered him, "He was a hairy man with a leather girdle bound about his loins." And he said, "It is Elijah the Tishbite," (2 Kings 1:8.). According to the Treasury of Scripture Knowledge, in reference to 2 Kings 1:8, Elijah . . .
"he wore a rough garment, either made of camels’ hair, as that of John Baptist, or of a skin, dressed with the hair on. Sir J. Chardin informs us, in a MS. note on this place, cited by Mr. Harmer, that the eastern dervishes and fakeers are clothed just as Elijah was, with a hairy garment, girded with a leathern girdle."
Concerning John the Baptist, it says in Matthew 3:4, "Now John himself had a garment of camel’s hair, and a leather belt about his waist; and his food was locusts and wild honey." It may be that Zecharias, who had access to the temple and things in the temple, may have acquired Elijah's camel hair garment and given it to John the Baptist to wear. This is speculation, but it is an interesting possibility.
The Bible Guild
What if Jesus meant every word He said?