Is the expression '1/4 of something' or '3/4 of something' idiomatic/natural sounding?

Say, I have a packet of milk and there is not much left in it. If I pour it in a cup, it might less than 1/4 filled.

Can I describe it like this

There is less than one fourth of a cup of milk in the packet.

Or in another context

The amount of juice in the box will be slightly more than three fourth of a cup.

Also, should I use a or the with cup? one fourth of a cup or one fourth of the cup?

Both of your statements are fine. (just change three fourth to three fourths)

You should use "a cup". cup in this context is a general reference to a measurement. It is the same for everyone.

He drove on for half a mile.

You could use the if you were referring to a specific cup, though.

There was enough juice to fill three fourths of the cup.

It's grammatically correct to say one fourth of the cup. We are using "the" to refer to a specific cup.

Similarly, it's OK to say three fourths, not fourth, of the cup. We can also use one quarter and three quarters instead.