Yes, it is okay for you to leave this off of your return. It probably wouldn't impact your return much since it was only a couple of months.
Alternatively, you and your Ex-Husband could agree to split the Mortgage Interest, Real Estate Taxes, etc. for the months you both owned the house.