Gdybym był tylko bogaty? Why not?
Should be fine
'Gdybym był bogaczem'
Helbent - It's mean that you would have only $ and NOTHING ELSE, (You will be rather sad) ;) In example is a wish: (I would be happy) if I would be rich ;) (i have everything else and need only $)
what about : jeśli tylko byłem bogaty?
There is no conditional 'by' in your sentence. If you want to use jeśli, you can say "Jeśli tylko byłbym bogaty." But I really recommend our main answer here.
Thank you very much for your quick reply.