I doubt you can get away with rewrite rules only. This will only make the backend believe the url is accessed with the previous structure. The front-end will still read the url from the browser and see something invalid.
Unless of course you just create a redirect from /slug to /p/x-slug, but I don't think it's what you want to go for ?