Yes, "however" can be used in the middle of a sentence.It functions as a conjunctive adverb, connecting two independent clauses and indicating a contrast or a concession.
ex:
The weather was beautiful; however, we decided to stay home and relax.
however can also be used parenthetically, set off by commas, to add an element of contrast or an afterthought.
ex:
The project was difficult, however, ultimately rewarding.