You're trying to execute $file. Instead, you must echo it:
# ...
if echo "$file" | grep 'o' ;
# ...
Note that the grep will already print the filename, so you should silence it (e.g. grep -q 'o' or grep 'o' >/dev/null).
You're also passing -l to ls, which you don't want to do. ls -l prints the file name and attributes, and you'll be matching against them.
Also, you might want to use parenthesesquotes if you expect it to work with any file, but you're right in that that's not the source of the problem.
P.S.: As others have pointed out, you shouldn't use ls to begin with.