I believe the answer is no, the Model 3 fob is not compatible with your Model S.
If you go to the Tesla on-line store (Shop) and search for "fob" you will see three different FOBs will be shown. One for Model 3/Y, one for Model S, and one for Model X.
If you then open the page for the Model 3 fob, it will do a compatibility check against your vehicles. If you're not logged into your account already, there will be a link at the top to log into your account to check if this is compatible. If you're already logged in, then there will be a message saying if it's compatible or not.
When I go into the Model 3 fob page, it gives me a warning message saying it is not compatible with any of my cars, with the only car linked to my account being a 2023 MS LR.