I haven't been beyond Flam, but Google Maps will plot a route for you. As I assume you know, Ornes is on the north side of the Sognefjord while the components of the standard NiN itinerary are on the south side. That very much complicates travel by public transportation, because rural buses run infrequently and I suspect (I'm not sure) Sognefjord ferry crossings also aren't frequent.
It seems you have three options:
Public transportation, which involves multiple buses/ferries and will probably not be possible as a day trip, meaning you'd likely incur the cost of additional hotel nights--not cheap in Norway. The buses aren't exactly inexpensive, either, as I recall. Google indicates considerable walking will still be required--probably over an hour in aggregate. Fjord country can be very wet, so you might be doing that walking in the rain.
Car rental. I don't know where the best pick-up point would be, so there might be a good bit of mileage involved. In addition, car-rental will not be cheap (check on whether you have to return the car to the original pick-up point), but this is probably the best option from the standpoint of convenience + cost. One plus is that with a rental car you'd have some less expensive lodging options, not being limited to high-demand places like Flam. This approach would eliminate the walking required with the public-transportation solution.
Taxi or other private transportation. I assume this would need to be pre-arranged. It would certainly be very costly. However, if you want simplicity and are willing to throw money at the problem, it should be an option.
Google estimates the driving time from Flam to the Urnes stave church at under 2-1/2 hours. The distance is about 55 miles. I don't know whether the taxi cost could be reduced by booking pick-up and drop-off somewhere between Flam and Ornes, but now you're back to dealing with the infrequent buses.