Have created an epub3 (fixed layout) in Indesign CC2014, and it validates fine with EpubCheck.
Then I open it in Calibre to do som editing/fixing, and finds that when I save it, Calibre adds info in the content.opf-file that is not accepted by EpubChecker, or by the company that I use to publoiish books ti iTunes Store.
Is this a bug, - or are there ways to avoid this ...?
The error-report looks like this (there are several lines with this type of error):
... OEBPS/content.opf(4,119): attribute "ns0:role" not allowed here; expected attribute "dir", "id" or "xml:lang"

If you're not using any of calibre's automated "Beautify", "Fix html", or "Reorganize" features (and you've ensured that the ebook's metadata is not being updated before opening it in the editor), or you're not renaming files, then it (calibre) really shouldn't be changing anything you don't manually change yourself--certainly not in the opf file. It doesn't in my experience anyway. If you ARE doing/using any of those things with your epub3 book ... don't. It's not an epub3 "aware" editor (though it should handle html5 stuff OK).

I may be wrong, but I don't believe that just because something is "not accepted by EpubChecker" means it is not epub3 compliant.

True.
But I believe calibre's editor only "understands" ePub 2 when it comes to automatically updating/altering things in the opf file (metadata/file names/folder structure). So allowing calibre to automatically rebuild the opf to reflect those automatic changes will probably result in the opf being parsed/rebuilt as ePub2 (at least the package version declaration; which could make some meta entries invalid).

If the OP wants to use calibre's editor to update the metadata of a valid ePub3, they'd have to turn off the automatic metadata updating (like Kovid mentioned), and change the metadata manually in the OPF file. With "automatic metadata updating" turned off, manual changes to the markup and opf/ncx files should not result in the opf file being rebuilt.

I've manually edited valid ePub3s with calibre's editor and had them remain valid after saving. So it can be done. You just have to be careful and not let the editor do anything FOR you (except maintain the container, of course ).

The editor just keeps the parsed OPF as an lxml tree and re-serializes it, so no automatic changes should happen to the package version and so on. That said, the editor, like the rest of calibre has no support for epub 3, so if you plan to work on epub 3, it is best to be careful and turn off automatic metadata update.

The OP's error message actually does not indicate an invalid epub 3, it just indicates that either whatever was used to check the OPF does not understand how XML namespaces work or there is an extra attribute on some tag. Neither condition means that the epub 3 file will not actually work.

As is usual with epub validity checking, finding an "invalid" epub file is more likely to indicate that the tool you are using to check the epubs is pathetic rather than that the epub will actually not work anywhere.