There's a few different things going on in your question:
- A general question about whether you can write words in mixed kanji kana orthography
- An implicit question about when you can / cannot do so.
- Two specific examples
Starting with the first question, all Japanese language users including native speakers write some words using a mixture of kana and kanji. This happens for at least three reasons. First, when taking notes or writing quickly, there's not always time to write a 20 stroke character. So for something like 機会, you will often see people write キ会. The same thing happens when you hear but don't see a person's name, you have to write it in kana (especially for ones with more than one common way to write it).
Second, the list of kanji taught in schools is managed by a government (or semi-governmental) entity and there are some things that are not on this list. And that means there are some parts of words that are not normally written in kanji -- like 処方せん (処方箋 if it were all kanji).
Third, there are some things like とる, みる where there are many different kanji and it's hard to know which one fits best with a particular activity. Non-native speakers like me are worse at this than native speakers, but native speakers also wind up just writing these in kana when unsure (this is separate from the use of みる as helping verb that means to try in which case it should always be written in kana).
So, the answer to your general question is yes and I've given three cases where everyone does it.
A fourth case is books for children. These will only include characters the child is expected to know and start adding more and more kanji as the grade level goes up.
Moving to your two specific examples, I've seen 図書館 written as としょかん in pre-schools and elementary schools. For two reasons, I think writing it と書かん might be slightly confusing. First, 図 and 書 are both learned in the second grade, so it's weird to have one but not the other. Second, と also functions as a particle so if someone cannot tell where the word break is (remembering there are no spaces in Japanese), then it's going to be harder to read than pure kana or pure kanji.
I think 以来 would be hard to understand if written as い来. Here because くる is such a common verb and い is the ending for Japanese adjectives, there's going to be a lot of potential for this to make it more confusing.
Maybe others disagree with me on this.
One final thought is that I think it's "acceptable" and probably beneficial in language-learning contexts to write this way -- meaning when you submit something to your teacher, they can help you know whether you're making progress if you do this, but it's (in my view) less "acceptable" in general communication in Japanese for the reasons I suggest above.