No it is not designed for that & I have not seen any software designed to make it possible on OS X.
You are asking for low level changes to the built in networking. OS X is not intended for this. A proxy is more likely what you want, but that is also usually done on a device that is designed for that task.
Your Mac will run many linux distro's if you really want to turn it into a captive portal or proxy server, but that is a waste of a money since a cheap PC can run linux & do this.
Choose the right tool for the job.