Why is the schema name necessary here and how to compile without it
Indeed relation is the name of a table. It must exist in the schema where you run this code (= belong to the user you are connected as).
Later you say that admin.relation works fine. This means that the table called relation belongs to a user called admin.
So ...

Either compile and run your code as admin (= connect as admin).
Or use fully qualified names and run the code from another user. Provided that user has the proper right (SELECT privilege) on table relation

Actually there is a third option that avoids the need to fully qualify the table name: have user admin create a public synonym to the table, like this:
create public synonym relation for relation;
or have a DBA do it:
create public synonym relation for admin.relation;
That way all users (provided they have the right to read that table) can refer to it by its name, without needing to fully qualify it with the name of the owner.