As long as the loan is secured, you can borrow for your down payment. If you own a car free and clear, then get a loan from your credit union against the car, that is an acceptable source of funds. If you have a stock portfolio and borrow against it, that is also an acceptable source of funds.
Of course, the payment on the loan is counted as one of your obligations when calculating your debt-to-income ratios.
A cash advance against your credit cards is not a secured loan. Therefore, it is not an acceptable source of funds. Neither is a signature loan from your credit union. Neither is a loan from your friend or family member. The loan must be secured against some asset you own.