No I/O of any type is allowed in a UDF; That includes disk, network, or standard I/O. The exception being FNC_Trace_Write. If you attempt I/O through some other means, such as including assembly code or separate package installation that attempt I/O, your code will probably fail or cause the database software to fail.
In Teradata V2R6.1 and later, a UDF can do "external I/O" via operating system calls; this is documented in the manuals. You can't have embedded SQL statements in source code provided to CREATE FUNCTION.