I don't think you can build the same amount of strength/muscle with only body weight exercises as with free weights. But you can build strength and muscle for sure. But as it was mentioned, not all body weight exercises provide the same stimulus. Push-ups are a low stimulus for most guys and so are body weight squats. They can be made harder, but there is a limit to that.
With bodyweight exercise the thing is that at one point to increase the demands enough for the exercise to provide a strong stimulus you have to make the exercises more an more difficult from a skill perspective.
For example, push ups aren't effective for long for guys. But you can do more demanding pressing exercise by doing handstand push ups and handstand push-ups from a deficit, but these require much more skills.
For squats you can do pistols which are also more demanding to do properly than body weight squats. Front lever work are a great back builder, but very hard to master, etc.
For a period of about 6 months all I did was body weight work. Mostly ring work and specifically working on ring dip --) iron cross progression and front lever progression. My back and shoulders progressed tremendously during that time. Pec/arms also had some improvements but legs regressed.
A Crossfit athlete I train spent a month on Sri Lanka on vacation and all he did was body weight work. Pistols, pull-ups, dips, sprints, jumps, throws, handstand push-ups. When he came back he did lose weight but not mmuscle (he didn't eat as much for a month). His upper body stayed about the same strength (military press, bench, weighted pull ups were the same) but his leg strength decreased (front squat, back squat, deadlift and Olympic lifts decreased).