Gaining muscle and not fat is not about 'eating only clean foods'... It is about your genetics (and potential to partition incoming nutrients into muscle cells), your training (right volume, right intensity, right frequency, right load andadequate rests) your physiology (hormonal envirmonement) and about total calorie intake and total macronutrient 'picture' (fats/protein/carbs).
So you can eat a super clean diet and still make crappy gains. Or you can eat healthy foods 80% of the time, while still enjoying treats and cheats, and you will make fantastic gains.
It is both much simpler than people think, and a lot more complex that people make out...
So, to answer your questions - yes, both cottage cheese and eggs are good for gaining weight if eaten in a diet that gives you more calories than you need (calorie excess = weight gain).
When used in combination with a good training program and an appropriate diet for your requirements and goals, they will also be fantastic at helping specifically with lean muscle gains.
And you can eat eggs how ever you wish (however I do suggest you cook them and do not just consume them raw).