It wouldn't be pretty (I'n not sure a pretty way exists), but maybe you could use plastic paver or landscape edging to border the pool. That would make you have to stand completely on the pool edge or step all the way over. Also, a red stripe along the top of the rail would be a visual incentive to stay off.

Pappy