I actually did that. I worked remotely for my employer while spending extended amount of time overseas. However I had to quit as a full-time employee and start a company in the USA to make this happen, and, just FYI, setting all of this up to be a fully legal and workable solution was quite an endeavor with a lot of involvement from business tax experts.
The company cannot keep you on the payroll, nor will they want to. It is illegal to hire / keep you as W2 if you are not authorized to work in the USA, period. Enforcement levels vary, but let's just say this is not a good time for companies in the USA to deliberately break immigration-related rules. Even if you were a US citizen or US resident and it was legal (like in my case), most companies would be unwilling to do this due to optics (everybody would want to go on an extended foreign vacation and work remotely... :-))
The fact they would even want to subcontract you while paying money to a foreign entity is much more than most American companies would be willing to do - it is a tax nightmare for American companies to send money to foreign accounts: FBARs, FATCAs and such, with very heavy penalties if they miss something.
Again, my employer would have none of that, which is why I had to set up a proper US-based business, so they could file standard 1099s and send money to a US-based bank.
Also, all American taxpayers have to report all foreign accounts they have access to, even if not their own. Your bank back home will also have to report you back to US IRS (if they don't, the entire country of Ecuador is facing sanctions per FATCA rules, so they might refuse to keep an account open for you if you don't keep enough money in it to make it worth while for them - this is common problem for people financially tied to USA even in rich European countries that get special banking sector preferences from USA).
You will need to talk to a lawyer or a CPA who specializes in US tax returns for entities doing business internationally to see how to make it happen with the least amount of hassle for you and your employer / customer.
Edit: The character limit did not allow me to put the answer to your comment question in a comment, so here it is:
Since I am neither a Certified Public Accountant nor an Attorney at Law specializing in US tax law vis-a-vis international business operations (and neither is the guy who wrote that article), I cannot say whether his statements are true (or how it works out in practice), I can only tell you that a company that operates in 83 countries and has an immigration attorney and an entire floor of accountants and CPAs on staff in the USA would rather apply for a work visa for an individual than have them work remotely from one of their foreign offices. And they did not want to have to deal with me as a "foreign contractor".
In case of my business, I did hire a foreign contractor (meaning a person that was local to my physical location while I was working remotely through my
business in the USA) and this is what my corporate CPA told me to do: 1. Have a written services agreement with the "foreign entity". 2. Have the "foreign entity" send me invoices for the services rendered. They would count as business expenses on my tax report. 3. I was allowed to wire the money to a foreign bank account, no problem. 3. Since the amount of money was small (less than $10,000 in a year), it fell beneath the FBAR and FATCA reporting limits.
I suspect what will happen in your case is your company will do whatever their CPA will tell them to do, in an effort to minimize their risk of being targeted by an IRS for an audit (never a fun occurrence).
My advice to you is: go with whatever your employer is comfortable doing to keep you gainfully employed, as long as it will not cause you any legal problems in the future.
When it comes to your US-based bank account, I honestly don't know how long your US bank will allow you to keep a US bank account without a valid US address.
Back in 2000 when I got my first US bank account it was a breeze. However when my wife was getting a US bank account last year (2018) as a freshly minted US Permanent Resident - the level of paranoia was astounding. She needed two documents proving her "physical residency in the state" before she was allowed to have an account.
You may have to prepare yourself for an eventuality that during one of their internal audits your US bank will close your account at some point in the future, if you cannot provide them with a vaild physical US address where the mail they send you does not bounce. Do you have any trustworthy friends in the USA so you could use their address?