You should check with your BK attorney on this matter (see link below if you need to locate an attorney).
Also, check out the web site below for financing information.
https://www.nolo.com/legal-encyclopedia/when-can-i-mortgage-after-bankruptcy.html
not saying you can't but with your credit score in the crapper and in BK court, what company would give you a mortgage even at usurious rates and how would you come up with the monthly payments? if you have enough cash to buy the house without a mortgage, I think creditors would want that money to go to reduce what you owe. if your hiding assets from your creditors, your next home might be 4 X 6 with vertical and horizontal bars and 1 small window.