IRCC did not state exactly how long you should be off welfare.......but you can't be on welfare when the spousal sponsorship application is submitted.
If the sponsor has been approved, and the sponsor doesn't go back to apply for welfare while the sponsorship is in-process, the PR application processing should be okay.
While its not mandatory to have a job to be eligible to sponsor.......you are required to show how you intend to financially support the person your are sponsoring.........so will advice you go get a job to earn income to support your financial plan to support the person you are sponsoring.