If you have a margin account, what you want to do will work with just fine IB. Cash account will probably not work.
With Reg T you can have 2x leverage, and with Portfolio Margin you can get even higher, so there is no problem to buy the TLT before SPY is sold, assuming you use 100% (1x) of...