My textbook's definition of measure goes like this
A set function $\mu$ defined on an algebra $\mathscr A$ is called measure if:
a) $\mu ( \emptyset ) = 0 $
b) $\mu$ is countably additive: i.e., if $\{A_n\}^\infty_{n=1} $ is a countable collection of sets in $\mathscr A$ such that (i) $A_n \bigcap A_m = \emptyset$ for $ n \neq m$, and (ii) $ A = \bigcup^\infty_{n=1} A_n \in \mathscr A $, then $\mu(A) = \sum^\infty_{n=1} \mu(A_n$).
However, in the definition of algebra, the book defined it to be closed under finite unions. To cross-check, this maths stack exchange post confirms that an algebra and sigma algebra's difference is the fact that algebra may not be closed over infinite unions.
Therefore, $A$ in the definition of measure may not belong to the algebra which doesn't make sense as I think the set function $\mu$ is $\mathscr A \rightarrow [0, \infty] $ (closed braces on infinity as given in my book). Can someone please solve my confusion? I think it may be that the set function is defined from smallest sigma field containing $\mathscr A$ then it would make sense but it is not apparent.