Yes, of course. Just about everyone, including ectomorphs, have been able to gain muscle and size by lifting weights and eating more - just like everyone else. The same rules apply. I don't mean this as an insult and I don't say it with malice. This is, in fact, good news. Many people have been where you are and have successfully achieved their goals of getting bigger and stronger. It is very possible and if you follow the correct steps, it is inevitable.