There is more to spells than having an altar or not. To answer your question Yes spells can be performed anywhere. To cast a successful spell you will need to know the basics and you will need to know how and why magic works. Here is a link that will assist you http://www.spellsofmagic.com/read_post.html?post=483942
Remember casting a spell requires practice and patience. You will have to put in intent, proper ingredients, if required, grounding before you cast the spell and much more. The above link will help you.