How can I simultaneously read from a file by UF and send to the indexer in Splunk format and to another device in syslog format?
The short answer is: you can't. UFs don't have that capability.
You can replace the UF with an HF configured to forward data via syslog (see https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Forwarddatatothird-partysystemsd#Sysl...). Or you can install an intermediate HF so configured and have the UF send to the HF instead of your indexers.