Is it possible to know who offered/offers and who bought stock? If not, what prevents a group of people to buy and sell stocks between them to "fake" interest in that stock and pump up the price?
Yes, it is possible. Each transaction is identified and recorded, and the entities involved are identifiable. After all - how else would they be receiving/paying the money?
This is not public information, i.e.: you cannot "google" it, but if a suspicion arises - it can be easily uncovered by the authorities.
The suspicion usually arises in such schemes because of abnormalities in behaviors of the people involved, and the brokers (at least in the US) are obligated to report to the authorities. It can also come from fraud complaints of people who got skimmed on pump-and-dump scheme.
However, many times these schemes are done through shell entities and layered structures of limited liability entities that make it hard to pin point the actual individuals. These schemes are usually very short termed and the entities involved disappear before authorities even start investigating.
Those who do it - are very good at what they do, as most "successful" criminals. Those who are not so good - get caught.
Detail for public consumption is usually limited to the clearing firm.
Large traders must register with the SEC, so they are presumably preemptively scrutinized.
Market manipulation is loosely defined in the law and by precedent, so brokers will not permit trading between accounts under their administration believed to be controlled by a single party even if you are innocently moving assets between accounts through trades in illiquid securities.