No, you cannot simply rename a function, package or procedure by an ALTER statement, there's no such syntax to support this.
All you can do is to DROP it and then CREATE a programming unit with a different name. That's the normal way to rename a schema object.
Trying to use RENAME TO statement to rename a function, package or procedure shall fail with error ORA-03001: unimplemented feature.