Apparantly both version are in use according to Google Books Ngram. However, the use of in public far more common than at public.
I wonder if saying at public is wrong or non-standart English even though it is in use.
For example :
Smoking in/at public should be forbidden.