Most likely you will need to remove the recessed housing and install a new work box attached to the framing and then patch the hole. You may need to install framing if the recessed was between the framing and not alongside it.
There are also surface mount trims for recessed lights that might suit your needs.
Answers based on the National Electrical Code. Local amendments may apply. Check with your local building officials.