"Christians are to keep themselves distinct and separate from the world, its spirit, and its influences. God is fully able to keep us in the world, but we are not to be of the world. His love is not uncertain and fluctuating. Ever He watches over His children with a care that is measureless. But He requires undivided allegiance. “No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon.” Matthew 6:24 . PK 59.1"
"No man can serve two masters: for either he will hate the one, and love the other; or else he will hold to the one, and despise the other. Ye cannot serve God and mammon."
Ellen White directly references Matthew 6:24 in this passage.
"Solomon was endued with wonderful wisdom, but the world drew him away from God. Men today are no stronger than he; they are as prone to yield to the influences that caused his downfall. As God warned Solomon of his danger, so today He warns His children not to imperil their souls by affinity with the world. “Come out from among them,” He pleads, “and be ye separate, ... and touch not the unclean thing, and I will receive you, and will be a Father unto you, and ye shall be My sons and daughters, saith the Lord Almighty.” 2 Corinthians 6:17, 18 . PK 59.2"
"For it came to pass, when Solomon was old, that his wives turned away his heart after other gods: and his heart was not perfect with the Lord his God, as was the heart of David his father."
EGW directly quotes 2 Corinthians 6:17, 18 in the passage, and connects it to the warning given to Solomon. This is a clear and direct connection.