Here's what I came up with. If there's still problems, please add/subtract to my test SQL so I can reproduce the error on my end.
Given the database objects:
-----------------------------------
drop table tab1 purge;
create table tab1(col1 number, someColumn varchar2(20), thirdColumn char(1));
insert into tab1 values(15000028435389,'Hello','Z');
insert into tab1 values(25000028435389,'World','Z');
insert into tab1 values(25000028435389,null,'Z');
commit;
create or replace function myFunc (inputID number)
return sys_refcursor
is
myresult sys_refcursor;
begin
open myresult for select * from tab1 where col1=inputID;
return myresult;
end;
/