How can I run an application which is outside Applications folder? Suppose that I move a.app outside /Applications to somewhere like ~/Downloads/MyApp (Note that I drop the extension). How can I run it from there using terminal?

I tried open -a but it says ... cannot be opened because its executable is missing.
It's not quite that easy.

Typical structure of an app:

MyApp.app
  Contents
    _CodeSignature
    Frameworks
    Helpers
    info.plist
    MacOS
      MyApp &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
    PkgInfo
    Resources


So in terminal you would open

/Path/To/MyApp.app/Contents/MacOS/MyApp

This doesn't work for all apps, but will work for most that are installed by a drag and drop.

If you want to launch them from finder, and associated them, but you just don't have the room  then in a terminal window:

sudo ln -s /Path/To/MyApp.app /Applications

This constructs a symbolic link in /Applications to where MyApp.app really lives.

Indeed if you are booting from a small disk, you may be able to move some applications off of the boot volume and put them on an external disk, replacing them with symbolic links.

Some applications install stuff into /Library.  To get these apps to run in different places takes a lot more work.  

Be cautious doing this with anything required for routine running.  You can get your mac into an unusable state.  If you want to play around with in a serious way, install Virtual Box on your mac, install another copy of MacOS in your virtual box, and play there.  (Give it half your ram)  

The performace is pretty sucky, but it's a safe way to play.