As I understand it, in Scripture, baptism is closely-linked with salvation in the way James indicated that works are linked with faith as a natural and inevitable expression or manifestation of faith. If one has "saving faith" - belief that anticipates corresponding positive action - it will inevitably find expression in the character of one's living. Works, then, can be said to be the final, natural by-product of faith. Baptism is the natural, inevitable extension of a saving faith into the realm of action; it is an expression of genuine, saving faith. In this sense, baptism is closely associated with conversion, though it is not necessary to salvation. This, however, is where a confusion occurs: the inevitability of the work of baptism in expression of one's saving faith is made more than it is, and becomes, in the minds of some, necessary to salvation.
But what is inevitable is not, therefore, necessary. I can own a lawnmower which I've purchased to cut my grass. If my lawn gets overgrown, and my lawnmower is working well, and I have the opportunity to cut the lawn, it is inevitable that I will run the mower over the lawn. But it is not necessary to my possession of my lawnmower to use it to cut the grass. If I never used my lawnmower to cut the lawn, I would still possess the mower. What is inevitable, then, is not always what is necessary.
This is the case with salvation and baptism: Baptism is inevitable (or ought to be) to salvation, but is not necessary to possessing salvation. These two things are so closely-related, like a lawnmower and cutting one's grass, that they often get made one-and-the-same thing. There are too many instances in Scripture, though, where faith and salvation are mentioned but not baptism. In fact, the vast majority of NT descriptions of salvation neglect to say anything about baptism. This is an odd thing, if baptism is essential, if it is necessary to one's salvation.