How to integrate a paper where I am third author, but did a lot of work, into my master's thesis?
This situation does not sound problematic to me.  Many people write theses that incorporate papers written under these circumstances.

However, you need to get official permission, rather than relying on what random people on the internet say.  Specifically, you need to check three things:


What does your thesis advisor say?
What are your university's regulations regarding reusing text from published papers, particularly with coauthors where it is difficult to identify who contributed to a given passage?
Does the publication or copyright agreement with the journal permit reusing this text in your thesis?


If any one of these has a negative answer, then you cannot copy the text.  If they are all positive, then all you need to do is attribute the text properly.  For example, you could clearly state at the beginning of a chapter "This chapter is an edited version of the paper BLAH."  Your advisor, university, and publisher will have suggestions or requirements for how this attribution should be done.