There are three definite and different James in the New Testament (NT).
James son of Zebedee, aka James the Great, definitely an apostle as defined at Acts 1:22 (eyewitness from baptism of John to ascension. This is the one at Acts 12:2, the first apostle to die. John his brother after the flesh, also son of Zebedee, died last.
James son of Alphaeus, aka James the Less, definitely an apostle as defined at Acts 1:22. He is identified in the upper room at Acts 1:13 and a four other places in the NT (Mt. 10:3, Mk. 2:14, 3:18, Lk. 6:15)
James brother of Jesus Christ, aka James the Just. He did not believe (John 7:5) until after ascension, so he is not an apostle per the Acts 1:22 definition. This is the James mentioned in Gal. 1:9 to whom Jesus appeared after resurrection, along with another 500 or so believers. He was elected first bishop of the church in Jerusalem. Yet, see the next comment.
The NT also defines apostle as a messenger, one who is sent forth (1 Tim 1:1, 1 Peter 1:1). See also Timothy, Barnabas, Sylvanus as apostles, though not eyewitnesses, again, like James the Just and brother Judas who also wrote an epistle.
Confusion arose over the centuries about who was who as people tried to explain certain beliefs. Some, for example, insist that James #2 and James #3 are the same person. They're not. See this example from Eusebius' History and Josephus citation.
Traditionally, given the early belief of who James #3 was (brother of Christ after the flesh), his writing is now in the NT. Aptly so. It is also tradition that Paul wrote Hebrews. Jude's epistle (Jude 1:1) claims to be James' brother. The two are in the list about Jesus' brothers (Mt. 13:55, Mk. 6:3). Alternatively, Jude the brother of James the Less wrote the epistle of Jude (see Acts 1:13).
So, you can be assured the NT is valid, viable, and valuable as to all things salvific.
To directly answer, James the Just cannot be one of the eleven (or twelve) apostles because he was not an eyewitness per Peter's definition. But apostle also means messenger sent. He and others were those.
As to whether Paul is number twelve or not, that's a different question.
Hope this helps clear some confusion.