Yes, if you are willing to travel to the US 2 times, you can do it.
Keep in mind that the re-entry permit, even if it is good for 2 years, does not protect you from immigration stopping you at the border and making you go in front of an immigration judge ... to prove that you didn't abandon your residence in the US.
FORMER IMMIGRATION LAW PROFESSOR -- LEGAL DISCLAIMER: This answer is offered for informational purposes only. It does not constitute an attorney-client relationship.
I think it depends on your status and what your reason for filing the I-131 is (are you an LPR seeking a re-entry permit or an adjustment applicant seeking advanced parole, for example). It seems to me that if you need a re-entry permit in the first place you may not be able to fly back in order to file the I-131. You may want to consult an attorney directly to make sure that you need to file an I-131 and that filing it will address your situation.
Please note that he information above is general in nature and is not intended to create an attorney-client relationship between us. It is intended simply as background material, is current only as of its indicated date, and may not include important details and special rules that could be applicable to your case. You should consult an attorney directly before acting or refraining from action.
The Form I-131 is a multi-use application for different types of benefits. We need more information about your current status and your goal in filing the I-131 application to be able to answer this question.