Yes, it is often a good idea to invest right now, using money from your primary home, when interest rates are lower than market returns (if the risk of market returns is acceptable to you). Keep 20% equity, though.
If you get a Home line of credit, in addition to a mortgage -- you can use that to borrow to invest outside of an RRSP/ TFSA and deduct the loan interest. If you are going to use your home equity after you refinance to invest in the tax sheltered funds, then just getting a larger mortgage works better as mortgage rates are a bit lower.
You want to keep as high a mortgage on the rental as possible, because that loan is tax deductible, and deploy the money elsewhere.