The First Welfare Theorem holds only if all consumers and firms are price takers. If some individuals or firms are price makers (they have the power to affect prices), then the allocation of resources will generally be inefficient.
Chapter 3, Tools of Normative Analysis, p. 44 - Public Finance - International Edition - Sixth Edition