Of course, you can connect Magic RDS and your broadcast automation or even more applications at the same time to the P164. The feature is called software port multiplication and it is illustrated in the Magic RDS help file m4vp.pdf, section 'RDS Encoder’s Port Multiplier' or 'Data Splitter for RDS Encoders'.
In such setup, only the Magic RDS is actually connected to the P164. All other applications connect to the Magic RDS Virtual Port instead of the encoder(s).
The benefits of such approach aren't quite obvious for a single encoder but the P164 is designed for large networks too, then you appreciate single access point for entire network, as well as the data vizualizers and loggers built in the Magic RDS.
Please read also the P164 manual, at least the sections '5.1 Broadcast Automation System Link-up' and '6.4 Ethernet Connection', for proper methods of configuration.