Nope, your wrong.
An OST, or Original Sound Track, is a media release of music that features in any work of media, be it a TV series, movie or game. BGM is a type of music, which can often be found on OST's.
OST is the name for the collective work, where as the individual songs may be divided into type: OP, ED, BGM, Instrumental, karaoke, insert song etc. BGM is, of course, music which is used as a background piece, often to set a mood or emotion.
Many people use the word OST incorrectly, which may be why your confusing it. Alot of times I see people asking 'what is this OST?', this is incorrect. The song may be from an OST, but its not an OST unto itself.