Generally speaking, the rules remain the same regardless of who pays the bill.
The American Bar Association's Model Rule of Professional Responsibility 1.8(f) confirms that the lawyer's duty to act in the client's best interest and preserve the client's confidences must not be interfered with when the lawyer is paid by one other than the client:
A lawyer shall not accept compensation for representing a client from one other than the client unless:
the client gives informed consent;
there is no interference with the lawyer's independence of professional judgment or with the client-lawyer relationship; and
information relating to representation of a client is protected as required by Rule 1.6 [confidentiality].
This means that the lawyer must advise the client to act against the interests of the person paying the bill, if that is in the best interests of the client. For example, in the situation where a company pays for an employee to get independent legal advice about a settlement with the company, the lawyer would have to advise the client (employee) not to settle if the company was offering a bad deal.
Of course, the real world is complex and people do not usually provide carte blanche to a law firm to represent potentially hostile third parties. The situation may arise where the lawyer's duty to act in the client's best interest conflicts with their desire to maintain a relationship with the person paying the bills. In this case, the lawyer must end one of the relationships. Such ethical issues are further discussed in the ABA article When a Third Party Pays the Legal Fees (2019).