It's truly a shame that the only 2 actual lenders that responded, did so with their typical copy and paste answers that they give everyone. Frankly, it's insulting that thye don't even bother to address your question but rather use it as an opportunity to do an infomercial for their services.
You don't need to work in the state, you can buy a home regardless; financing the home may be more of an issue. For it to be considered owner occupied, you will have to prove that it is your primary residence and that can be difficult when you work out of state. This is not to say it cannot be done. It's easier if it's your only property. You will have to occupy it within a short period of time after closing and provide letters of explanation as to why you work out of state. A good loan officer should have no problem getting this done for you. There is always investor financing available if you cannot prove owner occupancy.