Yes, you can get a loan on your house that is for sale. The Loan to value percent that you can draw out will be lower because the home is for sale and you are going to have a higher rate. Do not try to hide the fact that it was for sale. The bank will find out anyway.
Pam's solution does not work. Appraisers pull MLS activity for the previous 12 months to determine if it has been listed at any time within the past year. Merely taking it off the market immediately before applying for a loan will do you no good. The bank will still know that it WAS for sale, and underwrite or decline the loan accordingly.
If you home is on the market is would be very difficult to obtain a loan. You best bet is to take it off the market to get a loan. Make sure the loan you are getting does not have a prepayment penalty.