Trade-off between content and style I am in the UK and I completed an undergraduate dissertation.
In my dissertation I went much higher than my level. All the content in my dissertation was at a masters level and everything was self-taught. 
However I sort of came undone in my viva, where I was told I kept jumping into stuff.

I was wondering, when writing an undergraduate of a masters dissertation, is it better to go above and beyond your level and be ambitious or make sure the document is written very well and stay at the level you are currently at?
As you already noticed, you do not need to decide for one or the other but have to make a trade-off. I would advice to make this trade-off strongly in favour of good writing, i.e., schedule your work such that you have sufficient time to write down your thesis (or similar) properly and to have it reviewed for intellegibility (likely by your supervisor) and react to this. The reasons for this are as follows:


Your work is wasted if nobody understands it. The people who reviewed your thesis usually include your supervisor, i.e., the person who is most familiar with and most interested in your work apart from you and the single person whom you really need to demonstrate the value of your work. If even they had no chance to appreciate it, what was your work good for?
Communicating your work is one of the most important skills of an academic and hence one of the most important skills to learn in your studies. Most academics spend a considerable amount of time by communicating their work to others and academic success crucially depends on it. For example, people only tend to cite your work if they understand it. as far as I can tell, this is no different when you intent to leave academia.

Thus, time invested in learning communicating your work, in particular time invested in writing a thesis properly, is certainly not wasted. From another point of view, communicating your work is one of the skills you should be able to demonstrate when writing and defending a thesis – it’s not just about your knowledge of your field and applying this knowledge.
There is a saying that goes along the lines of this (and which I fail to find properly phrased right now):


  You only really understood something if you can teach it to others.


While there are a few people whose didactical skills are exceptionally bad in comparison to their expertise, these are really the exception (and you should not strive to be one of them) and this saying is mostly true otherwise. There are two things to “learn” from it:

By trying to properly communicate your work, you take different points of view at your work and thus understand it. This may enable you to find ways to improve your work or to apply it and connections to existing work.

If you cannot communicate your work, this is usually seen as an indicator that you did not fully understand what you are doing and thus is likely to lower the opinion of others of your work, in particular of important people such as your supervisor.