You cannot prevent game sharing between different PSN accounts on the same PlayStation 3. The console's architecture was designed around shared access.
Separate user profiles — Doesn't block access, but keeps save data, trophies, and friend lists isolated.
Physical disc control — Only the disc owner can play disc-based games. Digital purchases remain shared.
Buy a second PS3 — The only true way to isolate libraries. Impractical for most.
Sony designed the PS3 as a household device, not a personal one. If strict purchase separation matters, the platform fundamentally doesn't support it. Consider this a feature, not a bug—many families appreciate the shared library.