For underwriting purposes, the HELOC will be counted against your overall Debt to Income ratio by allocating a 1% monthly liability based on the total loan committment for the HELOC. For example, if your HELOC limit is $50,000, then factor in a 1% monthly multiplier (50,000 x 1.00% = $500/month).
If your 'tight' already on your DTI ratio, then the HELOC might push you over the limit. Check with a local banker and disclose the HELOC, run your numbers and hopefully you still have enough room to make the refinance work.
Each 2nd mortgage lender has a protocol you must follow, typically it starts out getting a 1st mortgage refinance approval so the terms & conditions of the new proposed 1st mortgage are known. Often a title report & appraisal are also needed, but not always. Once the items on the 2nd mortgage lenders subordination checklist have been gathered up, it is all submitted to the 2nd mortgage lenders review/underwriting team which usually takes awhile, most are 2-4 weeks. Then at that point your 2nd mortgage lender will approve, reject, or counteroffer your subordination request. If it's approved on the terms requested, then you can proceed to close on your 1st mortgage refinance. If the 2nd mortgage lender rejects it and doesn't give a counterproposal, then you cannot refinance your 1st mortgage unless you pay/close out your 2nd mortgage simultaneously with the transaction.
If that is the case though, where they won't agree to subordinate, you can instead apply for a new 2nd mortgage with them again, while in the midst of your 1st mortgage refinance, and then your new 2nd mortgage from the same lender can typically close concurrently with your new 1st mortgage refinance. The new 2nd mortgage terms may be different than your current terms, but it is one solution if they won't agree to subordinate to a new 1st mortgage refinance.
To refinance, the lender will order an appraisal. If your property appraises for more than the amount you want to refinance, and you meet all other lender requirements (i.e. income, credit scores, etc.), then you can refinance. Depending on the lender you use, they may want you to close the HELOC before they will do the refinance. If you want to refinance more than what your property appraises for, you will not be able to refinance.