Is this a boundary between areas A and B? Wall condition? Or is this an interface? Could you please add an image so we can understand?
You are right - you cannot specify both Flux and Value at the same time. If you are looking for a macro to estimate the flux at a specific boundary, you can use F_FLUX.
2.8.3. DEFINE_UDS_FLUX (ansys.com)